eng325-lab2-s232953-report

26
Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling – Prac2: Modelling of a liquid level control system in the frequency domain School of Engineering and Information Technology ASSESSMENT COVER SHEET Student Name Mark Cruickshank Student ID S232953 Assessment Title Lab2 – Modelling of a liquid level control system in the frequency domain Unit Number and Title ENG325 SYSTEMS MODELING Lecturer/Tutor Damien Hill Date Submitted 14/5/2015 Date Received Office use only KEEP A COPY Please be sure to make a copy of your work. If you have submitted assessment work electronically make sure you have a backup copy. PLAGIARISM Plagiarism is the presentation of the work of another without acknowledgement. Students may use a limited amount of information and ideas expressed by others but this use must be identified by appropriate referencing. CONSEQUENCES OF PLAGIARISM Plagiarism is misconduct as defined under the Student Conduct By-Laws. The penalties associated with plagiarism are designed to impose sanctions on offenders that reflect the seriousness of the University’s commitment to academic integrity. * By submitting this assignment and cover sheet electronically, in whatever form you are deemed to have made the declaration set out above. I declare that all material in this assessment is my own work except where there is a clear acknowledgement and reference to the work of others. I have read the University’s Academic and Scientific Misconduct Policy and understand its implications.* http://www.cdu.edu.au/governance/documents/3.3academicandscientificmisconduct.doc . Signed: Mark Cruickshank Date: 14/5/2015

Upload: sammckinley

Post on 14-Sep-2015

9 views

Category:

Documents


2 download

DESCRIPTION

CHARLES DARWIN UNIVERSITY ENG432 LABORATORY 2 - 3 DEGREES OF FREEDOM SYSTEMS - This guy got 100%

TRANSCRIPT

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    School of Engineering and Information Technology ASSESSMENT COVER SHEET

    Student Name Mark Cruickshank Student ID S232953

    Assessment Title Lab2 Modelling of a liquid level control system in the frequency domain Unit Number and Title ENG325 SYSTEMS MODELING Lecturer/Tutor Damien Hill Date Submitted 14/5/2015 Date Received

    Office use only KEEP A COPY Please be sure to make a copy of your work. If you have submitted assessment work electronically make sure you have a backup copy. PLAGIARISM Plagiarism is the presentation of the work of another without acknowledgement. Students may use a limited amount of information and ideas expressed by others but this use must be identified by appropriate referencing. CONSEQUENCES OF PLAGIARISM Plagiarism is misconduct as defined under the Student Conduct By-Laws. The penalties associated with plagiarism are designed to impose sanctions on offenders that reflect the seriousness of the Universitys commitment to academic integrity. * By submitting this assignment and cover sheet electronically, in whatever form you are deemed to have made the declaration set out above.

    I declare that all material in this assessment is my own work except where there is a clear acknowledgement and reference to the work of others. I have read the Universitys Academic and Scientific Misconduct Policy and understand its implications.* http://www.cdu.edu.au/governance/documents/3.3academicandscientificmisconduct.doc. Signed: Mark Cruickshank Date: 14/5/2015

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    ENG325 SYSTEMS MODELING 2015

    Prac2: Modelling of a liquid level control system in the frequency domain

    Mark Cruickshank S232953

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    !

    Table!of!Contents!

    1.!Task!1!!Data!Acquisition ..................................................................................................... 4!2.!Task!2!!Matlab!Analysis ...................................................................................................... 4!2.1!Input!and!output!to!the!system!at!0.05!rad/sec. .................................................................................................... 4!2.2!Input!and!output!to!the!system!at!0.1!rad/sec........................................................................................................ 5!2.3!Input!and!output!to!the!system!at!0.2!rad/sec........................................................................................................ 5!2.4!Input!and!output!to!the!system!at!0.5!rad/sec........................................................................................................ 6!2.5!Input!and!output!to!the!system!at!1!rad/sec. .......................................................................................................... 6!2.6!Input!and!output!to!the!system!at!2!rad/sec. .......................................................................................................... 7!2.7!Input!and!output!to!the!system!at!5!rad/sec. .......................................................................................................... 7!2.8!Input!and!output!to!the!system!at!10!rad/sec......................................................................................................... 8!Table!2.9!@!Time!periods!between!peaks .......................................................................................................................... 8!Table!2.10!!Results!of!task!2................................................................................................................................................. 9!3.!Task!3!!Bode!Plot ................................................................................................................ 9!3.1!Bode!plot!!magnitude!and!phase................................................................................................................................. 9!4.!Task!4!!System!Identification ............................................................................................ 10!Table!4.1!!Results!of!task!4................................................................................................................................................. 11!4.2!!Plot!of!the!model!of!the!system ............................................................................................................................... 12!4.3!!Plot!of!model!of!the!system!with!Matlab............................................................................................................. 12!4.4!Residuals!from!Matlabs!model!fitting ..................................................................................................................... 13!5.!Task!5!!Comparison!of!models!derived!in!time!&!frequency!domains................................ 13!5.1!Model!of!the!system!in!the!time!domain................................................................................................................. 15!7.!Task!6!!Conclusion ............................................................................................................ 15!

    !

    !

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    1.!Task!1!!Data!Acquisition! This did not apply to external students.

    2.!Task!2!!Matlab!Analysis! For a given frequency, as given in the data, we can determine the input and response amplitudes as well as the phase shift. In this experiment all graphs have been loaded into Matlab to obtain the response for a given frequency, these can be seen in the following figures:

    2.1!Input!and!output!to!the!system!at!0.05!rad/sec.!

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    2.2!Input!and!output!to!the!system!at!0.1!rad/sec.!

    2.3!Input!and!output!to!the!system!at!0.2!rad/sec.!

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    2.4!Input!and!output!to!the!system!at!0.5!rad/sec.!

    2.5!Input!and!output!to!the!system!at!1!rad/sec.!

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    2.6!Input!and!output!to!the!system!at!2!rad/sec.!

    2.7!Input!and!output!to!the!system!at!5!rad/sec.!

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    2.8!Input!and!output!to!the!system!at!10!rad/sec.!

    The phase shift is determined by physically measuring the time differences between each peak of the input and response amplitudes. In this experiment I have use the zoom-in and data cursor tool in Matlab to precisely obtain these time intervals. Therefore the difference between these signals allows us to determine the phase shift. The results for all these for all frequencies are displayed in the below table:

    Table!2.9!N!Time!periods!between!peaks!

    Determining the phase shift

    Frequency Input [t] Response [t] Difference between peaks [t] Phase shift

    [deg] 0.05 49.87 59.26 -9.39 -26.90 0.10 48.81 56.86 -8.05 -46.12 0.20 25.05 30.52 -5.47 -62.68 0.50 10.62 13.68 -3.06 -87.66 1.00 17.07 18.77 -1.7 -97.40 2.00 10.54 11.44 -0.9 -103.13 5.00 5.09 5.57 -0.48 -137.51 10.00 3.96 4.22 -0.26 -148.97

    As displayed in the above table, we can se that the difference in peaks has a negative component, this is because the system experiences a time delay thus the response of the system lags the input to the system. We can determine the period of both signals to calculate the associated phase shift.

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    The bottom table displays all the values for the range of frequencies that were used in this experiment. The absolute magnitude is displayed in decibels; the transfer function has been multiplied by 20log to obtain the value.

    Table!2.10!!Results!of!task!2!

    RESULTS TABLE TASK 2

    U A HU(t) () [rad/sec] [V] [V] [v]

    H(j)| |H(j)| [deg]

    0.050 3.200 1.000 0.562 0.562 -5.005 -26.900 0.100 3.200 1.000 0.474 0.474 -6.484 -46.123 0.200 3.200 1.000 0.287 0.287 -10.842 -62.682 0.500 3.200 1.000 0.136 0.136 -17.329 -87.663 1.000 3.200 1.000 0.064 0.064 -23.876 -97.403 2.000 3.200 1.000 0.037 0.037 -28.589 -103.132 5.000 3.200 2.000 0.035 0.018 -35.139 -137.510

    10.000 3.200 2.000 0.014 0.007 -43.098 -148.969

    3.!Task!3!!Bode!Plot! The Bode from the results of the previous table can be seen in the below figure, the top graph in the magnitude of the transfer function and the bottom plot is that of the phase. Both these graphs are plotted against frequency.

    3.1!Bode!plot!!magnitude!and!phase.!

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    4.!Task!4!!System!Identification! There are numerous methods in determining the best-fit model for task three. For this task I will demonstrate two methods that could be used using Matlabs inbuilt graph fitting and an additional method by knowing the amplitudes for a set of given frequencies: By definition a first order system transfer function can be represented by the following equation, for our system, this is also a first order system:

    H( j ) = kj + p Where k is the gain of the system and p is the pole of the system, we notice that there is a positive sign in the equation as our system is stable, therefore the pole must be located to the left hand side of the imaginary axis. Consequently if the sign were negative the system would say to be unstable, also worth noting is we are not considering a zero in the system; the numerator on contains a K term. Therefore by knowing several values of the transfer function for a given frequency we can simultaneously solve for the gain and the pole. This can be seen as per the below equations, where I have picked the third set of values and the second last set of values to ensure the equation is to the best approximation.

    H( j ) = kj + pEquation _1:

    0.287 = k0.2 + pEquation _2 :

    0.018 = k5 + p

    Simultaneously solving equation 1 and equation 2 yields:

    k = 0.0922p = 0.1212 From the previous equation we can also determine the static gain of the system, this occurs when the frequency is equal to zero, this can be seen as per below equation:

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    H( j ) = kj + p =0.0922

    j + 0.1212

    H(0) = 0.09220 + 0.1212 = 0.7606

    ks = 0.7606

    By previously calculating the equation for the line of best fit through the data, we can then use the range of frequencies used in the experiment to determine the magnitude, the results can be seen in the below table, these theoretical results are in the yellow column, calculations can be seen in the attached Microsoft Excel spreadsheet:

    Table!4.1!!Results!of!task!4!

    RESULTS TASK 4

    THEO. EXP. [rad/sec] H(jw) |H(j)| |H(j)|

    THEO/EXP. [%]

    0.050 0.5385 -5.3754 -5.005 -7.40% 0.100 0.4168 -7.601 -6.484 -17.22% 0.200 0.2870 -10.840 -10.842 0.01% 0.500 0.1484 -16.570 -17.329 4.38% 1.000 0.0822 -21.699 -23.876 9.12% 2.000 0.0434 -27.237 -28.589 4.73% 5.000 0.01807 -34.892 -35.139 0.70%

    10.000 0.00910 -40.810 -43.098 5.31% In the column furthers to the right hand side I have compared these results to the experimental results (actual results); we can see theoretical results are within reason to model this system. In the below figure I have modeled the results in Matlab and graphically compared these results to the experimental data. We can see that besides the second frequency, the results are within 0-10% comparison.

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    4.2!!Plot!of!the!model!of!the!system!

    The second method in completing this part of the experiment can be determined by using the graph fitting tools within Matlab, I have used this to fit a linear and quadratic lines through the data, this can be seen in the below figure, the advantage of this is we can obtain an equation from the models:

    4.3!!Plot!of!model!of!the!system!with!Matlab!

    We could use these equations to determine the magnitude per given frequency, and then converting the answer to the log inverse to determine the response, I decided not to use this method as there is a higher amount of error associated with this. As we can see, the residuals of this method can be seen in the below figure:

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    4.4!Residuals!from!Matlabs!model!fitting!

    5.!Task!5!!Comparison!of!models!derived!in!time!&!frequency!domains! From the model we have derived in Task 4, we use this transfer function to derive an experimental model in the time domain. This can be achieved by taking the inverse Laplace Transform of this model. Given our modeled transfer function:

    H( j ) = 0.0922j + 0.1212 And then moving from the Fourier Transform to the Laplace Transofrm; substituting the

    j for s:

    H(s) = 0.0922s+ 0.1212 Because this is the transfer function of the system and we want to find the output of the system, and given the input to the system is the unit step function, the output of the system becomes, where G(s) is the output of the system in the frequency domain:

    G(s) = 1s0.0922s+ 0.1212

    "

    # $

    %

    & '

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    And by taking partial fraction of the above equation, the output of the system in the frequency domain becomes:

    G(s) = 1s0.0922s+ 0.1212

    "

    # $

    %

    & '

    G(s) = 0.761s 0.761

    s+ 0.1212

    We have determined the partial fractions so that we can easily convert these two above fractions into the time domain using the inverse Laplace Transfer, this can be seen as follows:

    G(s) = 0.761s 0.761

    s+ 0.12121[G(s)] = 1 0.761s

    #

    $ % &

    ' ( 1

    0.761s+ 0.1212

    #

    $ % &

    ' (

    where :1[G(s)] = g(t)g(t) = 0.761u(t) 0.761e0.1212t

    g(t) = 0.761 1u(t) e0.1212t[ ]

    The output of the system is represented by g(t) in the time domain can be seen in the above equation. To compare this to the model in the first Assignment we need to compensate for the 50% offset. I have determined this by plotting the results of Assignment 1 and using the initial voltage at time was equal to zero. To effectively model this system to the results of laboratory 1, the equation to best simulate this is as per below equation:

    g(t) = 0.761 x e0.1212( t )[ ]1.3 = 0.761 x 1[ ]x = 2.708g(t) = 0.761 2.708 e0.1212( t )[ ]g(t) = 2.0608 0.761e0.1212(t )

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    5.1!Model!of!the!system!in!the!time!domain!

    As seen in the above lot, the green line is the model of the system developed in task 4, the blue graph is of the results of the first laboratory. Although both lines reach around the same amplitude the modeled response appears to raise faster then the results of laboratory 1, this would mean that the actual response of the system experiences a longer time delay. The discrepancy may have arisen in obtaining the modeled response.

    7.!Task!6!!Conclusion! The experiment has allowed us to further understand how important the Fourier and Laplace Transforms are in signal systems analysis by using mathematics to convert signals from the frequency domain to the time domain and vice versa. We also observed through the results of this laboratory how increasing the frequency affects the systems phase shift, as demonstrated in Task 2. Also observed was as the frequency was increased the amplitude of the output signal became smaller in amplitude. Distortion was noticed as the frequency was increased; specifically this was when the frequency was increased from around 2 rad/sec to 10 rad/sec, it became more difficult to determine where the actual peak occurred for calculating the phase shift, we can see this in the last tow results on the bode plot where they appear to differ in comparison to the other results. Therefore we could conclude that due to the distortion of the signal could have possibly contributed to the small amount of error associated with the systems modeled response. In task 5 our modeled response in the time domain resembled that of the experimental data obtained in laboratory one, what is clearly evident is that the time constant of the modeled system is not within comparison with the physical model.

  • Mark Cruickshank S232953 Charles Darwin University 2015 ENG325 Systems Modeling Prac2: Modelling of a liquid level control system in the frequency domain

    I have learnt in Dynamics of Engineering System ENG432, that it takes approximately 4 tau for a system to reach its maximum value, we can recalculate the time constant based on the physical model, where the pole of the system in inversely proportional to the time constant, this is seen as per below equation: Where:

    p = 1

    And it takes approximately 4 tau to reach its final value, and from the physical results we can say that it takes approximately 110 seconds to reach to final value (as approximated of the plot) we can determine tau:

    =1104 = 27.5

    By obtaining tau, we can then determine the pole:

    p = 127.5 = 0.0364 As we know the pole of the system, we can then conclude that the equation that best approximates the physical model is:

    G(s) = 1s"

    # $

    %

    & '

    ks+ 0.0364

    "

    # $

    %

    & '

    Concluding, the response of the system differed to the physical model due to pole of the system being of a too higher value, ideally this should have been within the vicinity of the previous equations pole, the pole we determined for the model was around 333% of a higher value then that determined as per above.

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 1 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Contents

    Task 2 - Input & response voltages versus time

    Task 3 - Bode plt

    Task 4 - Fitting a model to task 3

    Task 5 - Time domain

    clear allclose allclc

    Task 2 - Input & response voltages versus time

    % Set names for the files:

    % AA - 0.05 rad//sec% BB - 0.1 rad/sec% CC = 0.2 rad/sec% DD = 0.5 rad/sec% EE = 1.0 rad/sec% FF = 2.0 rad/sec% GG = 5.0 rad/sec% HH = 10 rad/sec

    % Load files and plot input & output response(s):

    load AA.txt %load filet = AA(:,1); % time is the first column of the data fileVinput = AA(:,2); % input voltage is the second column of the data fileVresponse = AA(:,3); % response is the thrid column of the filefigure(1); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 0.05 rad/sec - Task 2');grid on

    load BB.txt %load filet = BB(:,1); % time is the first column of the data fileVinput = BB(:,2); % input voltage is the second column of the data fileVresponse = BB(:,3); % response is the thrid column of the filefigure(2); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 0.1 rad/sec - Task 2');grid on

    load CC.txt %load filet = CC(:,1); % time is the first column of the data fileVinput = CC(:,2); % input voltage is the second column of the data file

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 2 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Vresponse = CC(:,3); % response is the thrid column of the filefigure(3); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 0.2 rad/sec - Task 2');grid on

    load DD.txt %load filet = DD(:,1); % time is the first column of the data fileVinput = DD(:,2); % input voltage is the second column of the data fileVresponse = DD(:,3); % response is the thrid column of the filefigure(4); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 0.5 rad/sec - Task 2');grid on

    load EE.txt %load filet = EE(:,1); % time is the first column of the data fileVinput = EE(:,2); % input voltage is the second column of the data fileVresponse = EE(:,3); % response is the thrid column of the filefigure(5); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 1.0 rad/sec - Task 2');grid on

    load FF.txt %load filet = FF(:,1); % time is the first column of the data fileVinput = FF(:,2); % input voltage is the second column of the data fileVresponse = FF(:,3); % response is the thrid column of the filefigure(6); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 2.0 rad/sec - Task 2');grid on

    load GG.txt %load filet = GG(:,1); % time is the first column of the data fileVinput = GG(:,2); % input voltage is the second column of the data fileVresponse = GG(:,3); % response is the thrid column of the filefigure(7); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 5.0 rad/sec - Task 2');grid on

    load HH.txt %load filet = HH(:,1); % time is the first column of the data fileVinput = HH(:,2); % input voltage is the second column of the data file

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 3 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Vresponse = HH(:,3); % response is the thrid column of the filefigure(9); % open new figureplot(t, Vinput, t, Vresponse); % plots the graphylabel('Voltage');xlabel('Time');title('Voltage input & response Vs time for 10 rad/sec - Task 2');grid on

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 4 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 5 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 6 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 7 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Task 3 - Bode plt

    ExpH = [-5.005,-6.484,-10.842,-17.329,-23.876,-28.589,-35.139,-43.098]; % the magnitude of the transfer function

    w = [0.050,0.100,0.200,0.500,1.000,2.000,5.000,10.000]; % given frquencies

    Exphase = [-26.900,-46.123,-62.682,-87.663,-97.403,-103.132,-137.510,-148.969]; % phase per determined frequency

    figure(10)

    subplot(2,1,1);semilogx(w,ExpH,'*');title('Experimental transfer function vs frequency - Task 3');ylabel('ABS H(jw)');xlabel('Frequency [rad/sec]');grid on;

    subplot(2,1,2);semilogx(w,Exphase,'*');title('Experimental phase vs frequency - Task 3');ylabel('Phase [deg.]');xlabel('Frequency [rad/sec]');grid on;

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 8 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Task 4 - Fitting a model to task 3

    % Theoretical values - line of best fit

    H4 = [-5.3754,-7.601,-10.840,-16.570,-21.699,-27.237,-34.892,-40.810];

    % Model of TF best fit

    figure(11)

    semilogx(w,ExpH,'o',w,H4,'*');title('TF (Line of Best Fit) vs frequency - Task 4');ylabel('ABS H(jw) [dB]');xlabel('Frequency [rad/sec]');grid on;

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 9 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Task 5 - Time domain

    clear all clc

    % model of the system in the time domain is g(t)load step1.txttt = step1(:,1);g = 2.0608-(0.761.*exp(-0.1212.*tt)); % this is the modeled system in the time domain

    % vass1 is the system from the first assingment

    load step1.txttt = step1(:,1);vv = step1(:,3);figure(12);plot(tt,vv,tt,g);ylabel('Voltage');xlabel('Time [sec]');title('Task 5 - comparison of modeled and experimental results');grid on

  • 14/05/2015 10:43 pmENG325_LAB2_2015

    Page 10 of 10file:///Users/Master%20Cruickshank/Documents/MATLAB/html/ENG325_LAB2_2015.html

    Published with MATLAB R2014a