To Perform a Block Diagram Reduction Using MATLAB _ Matlab Examples

March 26, 2018 | Author: danycg85 | Category: Control System, Feedback, Control Theory, Systems Science, Physics & Mathematics


Comments



Description

17/10/2016To perform a block diagram reduction using MATLAB | Matlab Examples Matlab Examples Do You Speak Matlab? To perform a block diagram reduction using MATLAB It’s not convenient to derive a complex transfer function for a complex control system, therefore, the transfer function of each element of a control system is represented by a block diagram and the concerned system mentioned in the block represents the transfer function of the element. This symbolic representation in short form gives a pictorial representation relating the output and the input of a control system based on cause and e桨敡ect approach. Simple Block Diagram Block diagram shown above. Here G1(s) and G2(s) represents the transfer function of the individual elements of a control system. The system given is a feedback system or can also be called a closed loop system. The output signal C(s) is fed back to be compared with the input R(s) , the di桨敡erence E(s)=[R(s)– C(S)] is actuating signal or error signal. Problem: To reduce the given block diagram using sumblk and 䤀Ind impulse,step and ramp response. https://matlabexamples.wordpress.com/2013/11/29/to­perform­a­block­diagram­reduction­using­matlab/ 1/5  G4 = 100/(s+1).  G3. As shown  % below.  G2.  G2 = 2/((s^2) + (5*s) + 100). Using these defined input output we will be using sumblk ‐‐‐‐‐‐‐‐‐  G1. Why?? https://matlabexamples.OutputName = 'y'.  G4.com/2013/11/29/to­perform­a­block­diagram­reduction­using­matlab/ 2/5 .  G1.  G3 = 10/((2*s) +1).  %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % Now we are required to define all the blocks input and output.  G2.  %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % Note: Now we are required to relate all these inputs and outputs.  G3.OutputName = 'ym'.OutputName = 'ug1'.wordpress.17/10/2016 To perform a block diagram reduction using MATLAB | Matlab Examples Given Block Diagram Matlab Program %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % Experiment 2 ‐ Block Diagram Reduction  % By Siddharth Kaul  %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  %  % Reduce the given Block Diagram using sumblk function.InputName = 'u'.  G4.OutputName = 'ug2'.  G1 = 1/(s+1).InputName = 'e'.InputName = 'ym'.InputName = 'r'.  % [see the image attached]  %  % Given ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  s = tf('s'). '+‐').outputResp).  [outputResp.1:10].  % Step Response ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  inputTime = [0:.%. time] = lsim(OutputTF.G2.3). % e = r ‐ y  sum2 = sumblk('u'.wordpress. inputTime).sum1.G4.  title('Step Response'). % u = ug1 + ug2  % Rest is pretty simple ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % we have to find the relationship between r and ym for our output transfer  % function.17/10/2016 To perform a block diagram reduction using MATLAB | Matlab Examples  % Because there are two summing points in our block diagram.1:10].'r'.1.  % ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % End of Program.  % You can notice ym is our output and its not attached to any summing point  % hence it is not included in the summing.'ug1'.  plot(time.  subplot(3.com/2013/11/29/to­perform­a­block­diagram­reduction­using­matlab/ 3/5 .  % Ramp Response ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  inputTime = [0:. A generalised form has been given  % below. Others can also be included.  xlabel('Time ‐‐>').  xlabel('Time ‐‐>').1).  [outputResp.G3.1:10]. inputTime).'ym').  plot(time.  %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  sum1 = sumblk('e'.  subplot(3. This way  % matlab will be able to relate the transfer fuction with each other. inputSignal. Responses taken into account are step and  % ramp.  ylabel('Magnitude ‐‐>').  subplot(3. outputResp).  xlabel('Time ‐‐>').  ylabel('Magnitude ‐‐>').  inputSignal = 1*inputTime.  %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % First Impulse ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  inputTime = [0:.  [outputResp.2).sum2.'r'.1. inputSignal.outputResp).  title('Ramp Response').  title('Impulse Response').'ug2'). time] = step(OutputTF). Created By Siddharth Kaul  % ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ Output: https://matlabexamples. ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  OutputTF = connect(G1.  ylabel('Magnitude ‐‐>').1.'y'. inputTime). time] = impulse(OutputTF.  inputSignal = ones(size(inputTime)).  plot(time.  %‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐  % Calculating responses. com/2013/11/29/to­perform­a­block­diagram­reduction­using­matlab/ 4/5 .MyClassBook Asim https://matlabexamples. 2013 [https://matlabexamples. 4 thoughts on “To perform a block diagram reduction using MATLAB” Pingback: E桨敡ects of addition of poles and zeros to closed loop transfer function | MyClassBook Pingback: Addition of poles and zeros to the forward path transfer function – MATLAB Program | MyClassBook Pingback: E桨敡ects of addition of poles and zeros to closed loop transfer function .wordpress. Matlab Programming on November 29.17/10/2016 To perform a block diagram reduction using MATLAB | Matlab Examples Given Block Diagram’s Output Response This entry was posted in State Space Modelling and tagged Block Diagram.wordpress.com/2013/11/29/to-perform-ablock-diagram-reduction-using-matlab/] . Block Diagram Reduction. wordpress. https://matlabexamples. 2016 at 6:44 am Very Good Example.com/2013/11/29/to­perform­a­block­diagram­reduction­using­matlab/ 5/5 .17/10/2016 To perform a block diagram reduction using MATLAB | Matlab Examples April 2.
Copyright © 2024 DOKUMEN.SITE Inc.