Home

MathScript - Part II: Dynamic Systems

image

Contents

1. gt Find the step response for these systems End of Task 2 5 PID Currently the Proportional Integral Derivative PID algorithm is the most common control algorithm used in industry The PID controller calculates the controller action u t K t u t pip ug Kye edt Ky Tae Task 5 PI Controller gt Create a transfer function for a PI controller using both the built in pid function and the tf function in MathScript Do you get the same results MathScript Part Il Dynamic Systems 18 Transfer Functions Tip When using the tf function you need to find the transfer function for a PI controller using Laplace on the equation K t u t p Uo Kye edt Ti Jo Given the following system 1 Hp P 52425 6 Where Hp isthe Pl controller Hp isthe process and Hp is a low pass filter gt Use the step function in MathScript in order to plot the step response of the system Try with different values for K and T in order to get a good result End of Task 2 6 Analysis of Standard Functions Here we will take a closer look at the following standard functions e 1 Order system e 2 Order system Task 6 1 order system 1 order system The transfer function for a 1 order system is as follows H 9 Ts 1 gt Find the pole s gt Plot the Step response Use the step function in MathScript MathScript Part Il Dynamic Systems 19 Transfer Functions e Step
2. A Hegskolen i Telemark Telemark University College Department of Electrical Engineering Information Technology and Cybernetics So You Think You Can MathScript HANS PETTER HALVORSEN 2011 09 21 Part Il Dynamic Systems LabVIEW MathScript File Edit View Operate Tools Window Help Output Window Variables Script History A 2 X 2 3 5 6 7 8 9 10 12 12 13 14 15 Command Window Z x 2 y Command Window HAS Bks 0 2 1 51 Zit 0 0 5 5 4 for i 1 3 K k i num K den 1 0 H tf num den hold on step H t axis 0 5 0 5 gtext num2str K 16 end 17hold off integrator m Line 17 Column 9 in of Technology Postboks 203 Kj lnes ring 56 N 3901 Porsgrunn Norway Tel 47 35 57 5000 Fax 47 35 57 54 01 Preface Purpose with this Lab In this lab you will learn how to use a tool like MathScript which has a similar syntax as MATLAB to solve control and simulation problems In this assignment you will define and simulate dynamic systems using e Block Diagrams e Transfer functions e State space models e Time delay and Pade approximations For additional information and resources Note For all the tasks in this document you should use the Script Window Not the Command Window When you use the Script Window you can save ki the code as an m file In the Script Window we can enter seve
3. gt Create a pade approximation for the time delay 1 5 gt MathScript Part Il Dynamic Systems 32 Time delay and Pade approximations Set the time delay t 3 and find the pade approximation for different orders e g 1 2 3 4 10 Use the pade function in MathScript gt Use the step function to plot the responses for different orders Discuss the results End of Task Task 13 Pade approximation Note In this task we shall note use the built in pade function but create our own approximation using the definition itself 1 k s kas tt kas 1ks kss kps TS where gt Set up the mathematical expressions i e find the transfer functions for a 1 order and 2 order Pade approximation Pen amp Paper gt Define the transfer function for a 1 order and 2 order pade approximation using the tf function in MathScript Set the time delay 1 5 gt Use the step function to plot the responses Do you get the same results using the pade function Discuss the results End of Task Task 14 Transfer function with Time delay Define the following transfer function in MathScript H s 29 4 1 And plot the step response Try both the sys order1 and the pade functions to see if you get the same results Use e g a 5 order approximation End of Task MathScript Part Il Dynamic Systems 5Stability Analysis 5 1 Introduction A d
4. y olf 0 Llu m gt Define the state space model above using the ss function in MathScript Step Response gt Apply a step in u and use the step function in MathScript to simulate the result Start with c 1 m 1 k 1 then explore with other values MathScript Part Il Dynamic Systems 24 State space Models Conversion Convert the state space model defined in the previous task to a transfer function using MathScript code End of Task Task 10 Equations Implement the following equations as a state space model in MathScript 21 gt X2 2X gt 2x4 6x T4u T8u y 5x4 6x T7u gt Find the transfer function s from the state space model using MathScript code gt Plot the Step Response for the system Discuss the results End of Task Task 11 Block Diagram gt Find the state space model from the block diagram below and implement it in MathScript Note x1 x and x gt Xp MathScript Part Il Dynamic Systems 25 State space Models Set a 5 Q5 2 And b 1 c 1 gt Simulate the system using the step function in MathScript End of Task MathScript Part Il Dynamic Systems 4 Time delay and Pade approximations 4 1 Introduction Time delays are very common in control systems The Transfer function of a time delay is H s 2e 9 In some situations it is necessary to substitute e with an approximation e g the Pad approximation 1 k s k
5. You also can use this function to calculate coefficients of numerator and denominator polynomial functions with a specified delay 1 y 2 PNP Y For more details about these functions type help cdt to get an overview of all the functions used for Control Design and Simulation For detailed help about one specific function type help function name MathScript Part Il Dynamic Systems Hegskolen i Telemark Telemark University College Faculty of Technology Kj lnes Ring 56 N 3914 Porsgrunn Norway www hit no Hans Petter Halvorsen M Sc Telemark University College Department of Electrical Engineering Information Technology and Cybernetics Phone 47 3557 5158 E mail hans p halvorsen hit no Blog http home hit no hansha Room B 237a m m m
6. ede Erbe o de Y VP dre o bres su URS 40 MathScript Part Il Dynamic Systems Control Design in MathScript In this task you will learn how to use MathScript for Control Design and Simulation We will learn to create transfer functions and state space models and simulate such systems We will also learn how to implement systems with time delay using Pade approximations Note Using LabVIEW MathScript for Control Design purposes you need to install the Control Design and Simulation Module in addition to the MathScript RT Module itself Type help cdt in the Command Window in the MathScript environment and the LabVIEW Help window appears E LabVIEW Help 1 ER c Er Skjul E S k Tilbake Fre Alternativer Innhold Stikkordregister S k Favoritter Considerations for Embedded T argets Glossary gt Building and Configuring Simulations Modularizing the Simulation Diagram gt Trimming and Linearizing Nonlinear Models _ Executing Simulations in Real Time gt Optimizing Design Parameters Using the Simulation Model Converter QG Control Design and Simulation Vis and Functions Error Codes gt Block Diagram Error Messages Mathematical Model Definitions QQ Control Design Vis and Functions Control Design Controls and Indicators Analytical PID Design VI Dynamic Characteristics VIs gt Frequency Response VIs Implementation Vis and Functions Model Construction
7. s is the Measurement sensor transfer function Note Another notation for L is Ho Tracking transfer function The Tracking transfer function T s Norwegian Fglgeforholdet is defined as follows 7 AcHpHm _ L s T s 1 S s r s 1 H HpHm 1 L s The Tracking Property Norwegian f lgeegenskaper is good if the tracking function T has value equal to or close to 1 IT 1 Sensitivity transfer function The Sensitivity transfer function S s Norwegian Sensitivitetsfunksjonen avviksforholdet is defined as follows MathScript Part Il Dynamic Systems 38 Stability Analysis lt lt 4 ris 1 1 5 The Compensation Property is good if the sensitivity function S has a small value close to zero ISl 0orlS 1 Note L s 1 iti DEN c T s S s Task 17 Stability Analysis of Feedback Systems Given the following feedback system The transfer function for the process including the measurement sensor is Hpy S s Ds The transfer function for the controller is Hg s Kp gt Find L s T s and S s for the system gt Plot the step response T s and plot the poles in the imaginary plane for T s Is the system stable or unstable Start with Kp 1 than explore with different values End of Task MathScript Part Il Dynamic Systems oAdditional Tasks Task 18 Integrator Integrator The transfer function for an Integr
8. the Script window as shown below gt LabVIEW MathScript File Edit view Operate Tools Window Help Use the Scri p t Window Output Window a History For help enter help classes j a gt gt gt afe Transfer Function 1mum 1 2 den l 1 You see the results in E c5 Save your script the Output Window 1 0003 1 000 Execute your script Continuous time model Here you can enter several line of code that will be executed in a sequence MathScript Part Il Dynamic Systems 12 Transfer Functions We can also use the sys order1 function K 1 i i H sys orderl K T End of Example Step Response The step response for a 1 order transfer function is as follows a step U at t 0 y KU 63 T t The time constant T is defined as the time where the response reaches 63 of the steady state value Task 1 Transfer function gt Use the tf function in MathScript to define the transfer function below H s Ts 1 Set K 3 and T 5 gt Define the same function using the sys order1 function Find also the step response for the system using the built in step function Note In this task and the subsequent tasks you should use the Script Window Not the Command Window When you use the Script Window you can save the code as an m file In the Script Window we can enter several commands in a sequence and sa
9. F m use this function to state space models to transfer function in Hep on form Sys order1 Constructs the components of a first order system model based AM d on a gain time constant and delay that you specify You can use 4 sys order1 K tau this function to create either a state space model or a transfer i function model depending on the output parameters you specify Sys order2 Constructs the components of a second order system model de a i im o MI based on a damping ratio and natural frequency you specify You num den sys order2 wn dr can use this function to create either a state space model or a FE alii Clem transfer function model depending on the output parameters you specify pid Constructs a proportional integral derivative PID controller dus E pd E i 25 e 7 model in either parallel series or academic form Refer to the saysouttr pid Ko Ti LabVIEW Control Design User Manual for information about academic these three forms A general transfer function can be written on the following general form numerator s Dbms Fb 4s bys bg H s lt lt s denominator s a4s a4 4s 1 c a45s ao The Numerators of transfer function models describe the locations of the zeros of the system while the Denominators of transfer function models describe the locations of the poles of the system In MathScript we can define such a transfer fu
10. FONCION ANTT 9 2 1 MUOU O em cT 9 2 2 Firstorder Transter FURCHONS escenes ene i R e 11 23 S5econdorder Transter FUNCTIONS 13 2 4 BIO TAY 02 RTT 15 P5 EE 17 26 Analysis or Standard FUNCTIONS ies ecuso sui teereencee ee eri bei v irte c E vimu b UN bnt sega i 18 3 Stare sSpdce TMDEHBIS soonest Ee en E E ee rd IU IMEEM de UE 22 3 1 82 2 nm 22 c MEMEMI c 23 4 Time delay and 206 0010 5 26 4 1 ON tees S 26 DERI m 31 5 cea acce E 33 5 1 HOU Me T 33 5 2 qe edges 34 EI o e 35 5 4 Feedba die I a 9 1c ee ee cee eee ee ee ee ee 36 vi vii Table of Contents 6 A Vo s T0187 Mic cd ARREST PEI 39 Appendix A MathsScript FUNCIONS urn ete torri roo eri Ebr S ei eI VEL eerie Eee er ER roseo iv
11. Part Il Dynamic Systems 15 Transfer Functions Explain the results Do you get the same results using tf and sys order2 End of Task Task 3 Step Response Given the following system s 1 H lt s 5 5 3 gt Plot the time response for the transfer function using the step function Let the time interval be from 0 to 10 seconds e g define the time vector like this gt 0d s 3 9 and use step 1 6 gt Find poles and zeros for the system Plot these into the complex plane Tip Use the built in functions poles zero and pzgraph gt Discuss the results End of Task 2 4 Block Diagrams MathScript have built in functions for manipulating block diagrams and transfer functions Serial H s N LC u s ee hy s ho s MathScript H series hl h2 MathScript Part Il Dynamic Systems 16 Transfer Functions Parallel y MathScript H parallel h1 h2 Feedback y MathScript H feedback h1 h2 Task 4 Transfer functions and Block Diagrams Use the series parallel and feedback functions in MathScript on the block diagrams below gt Find the transfer function H s S from the following block diagram MathScript Part Il Dynamic Systems 17 Transfer Functions Find the transfer function H s x S from the following block diagram u s Find the transfer function H s e from the following block diagram
12. Vis Model Conversion Vis Model Information Vis _ Model Interconnection Vis Model Reduction Vis Predictive Control Vis Solvers Vis gt State Feedback Design gt gt State Space Model Analysis Vs Stochastic Systems Vls Time Response Vis HE MERE E E BH EH EH lt Requires Control Design and Simulation Module and MathScript RT Module Use the Control Design MathScript RT Module functions to design analyze and simulate linear controller models using a text based language The following is a list of Control Design MathScript RT Module classes of functions and commands that LabVIEW MathScript supports The LabVIEW Digital Filter Design Toolkit installs additional MathScript RT Module functions cass escrip O ps Arithmetic operator functions Submit feedback on this topic Use the Help window and read about some of the functions available for control design and simulation 2 Transfer Functions 2 1 Introduction Transfer functions are a model form based on the Laplace transform Transfer functions are very useful in analysis and design of linear dynamic systems A general Transfer function is on the form H s 29 u s Where y isthe output and u is the input MathScript has several functions for creating transfer functions Function Description Example tf Creates system model in transfer function form You also can z s
13. ack connections Constructs a model in state space form You also can use this function to convert transfer function models to state space form 40 Example exque sm SY 4 Splot x Y gt num 1 gt den 1 1 1 gt H t num den num 1 gt den 1 1 gt H tf num den gt poles H gt num den delay Ts tfinfo SysInTF Smam es dus 3 1231 gt H t num den Pr lOs 0 em gt step H t gt t 080 1510 gt u sin 0 1 pi t gt isim Sysin u t SK is gt ta l 2H sys orderl K tau ror 9 5 gt wn 20 gt num den sys_order2 wn dr gt SysTF tf num den gt A B C D sys_order2 wn dr gt SysSS ss A B C D gt e wih Ol Came Sys lim gt Ke 0 5 gt Ti 0 255 DSoOoVSODUIE pid Kc Ti academic 1 uos RAS gt C2 2234 gt C conv C1 C2 gt Hseries series H1 H2 poyvschosed feedback 5vsrnoT Sysin 2 gt A gt eye 2 gt B 0 1 gt C B gt SysOutSS ss A B C 41 Appendix A MathScript Functions ssinfo Returns information about a state space system model ee 1 2 SC 55 5455 SSA B C D gt A B D Ts ssinto sysinss pade Incorporates time delays into a system model using the Pade 2 pace delay Order gt A B C D pade delay order approximation method which converts all residuals You must specify the delay using the set function
14. as sj ERE ES kns 1 5 ks ks S e Por Theory Pade approximation of a time dela A 1 order transfer function with time delay may be written as TS H s e Ts 1 Step Response A step response for a 1 order system with time delay have the following characteristics 26 27 Time delay and Pade approximations Step Step response 100 U 63 u t Prosess with Ynf t sensor and 0 0 measurement filter Time constant with time delay Time Time delay constant MathScript has a built in function called pade for creating transfer functions for time delays Function Description Example Incorporates time delays into a system model using the Pade gt num den pade delay order pade P y y B A B C D pade delay order approximation method which converts all residuals You must specify the delay using the set function You also can use this function to calculate coefficients of numerator and denominator polynomial functions with a specified delay gt K 4 T 3 delay 5 Sys order1 gt H sys orderl K T delay set gt H set H1 asnputdelay delay series gt H series H1 H2 MathScript has a built in function called pade for creating transfer functions for time delays Example This example shows how to use the pade function in MathScript Given the following system H s We want to create a Pade approximation with order 3
15. as two 1 order systems in series 1 K H s H4 s H4 s T s 1 Tos 1 E T s 1 Tos 1 Find the pole s gt Plot the Step response Set K 1 Set T 1 and T 0 T 1 and T 0 05 T 1 and T 0 1 T 1and T 0 25 11 1 and T 0 5 T 1 and T 1 Use the step function in MathScript Tip Use the conv or the series together with the tf function in order to define the system Compare and discuss the results optional Find the mathematical expression for the step response y t Use Pen amp Paper for this Assignment y s H s u s Where U u s P Tip Use inverse Laplace and find the corresponding transformation pair in order to find y t Use the mathematical expression you found for the step response y t and Simulate it in MathScript using e g For Loop Compare the result with the result from the step function Discuss the results MathScript Part Il Dynamic Systems 21 Transfer Functions End of Task MathScript Part Il Dynamic Systems 3State space Models 3 1 Introduction A state space model is a structured form or representation of a set of differential equations State space models are very useful in Control theory and design The differential equations are converted in matrices and vectors which is the basic elements in MathScript A general linear State space model is on the form x Ax Bu y Dx Eu MathScript has several functions for cr
16. ator is as follows K gt Plot the Step response Use different values for K eg K 0 2 1 5 Use the step function in MathScript Find the pole s Discuss the result gt Find the mathematical expression for the step response y t Use Pen amp Paper for this Assignment y s H s u s Where U u s gt Fi Tip Use inverse Laplace and find the corresponding transformation pair in order to find y t Use the mathematical expression you found for the step response y t and Simulate it in MathScript using e g For Loop Compare the result with the result from the step function End of Task 39 Appendix A MathScript Functions Here are some descriptions for the most used MathScript functions used in this Lab Work Function plot tf poles tfinfo step Isim sys order1 sys order2 damp pid conv series feedback SS Description Generates a plot plot y plots the columns of y against the indexes of the columns Creates system model in transfer function form You also can use this function to state space models to transfer function form Returns the locations of the closed loop poles of a system model Returns information about a transfer function system model Creates a step response plot of the system model You also can use this function to return the step response of the model outputs If the model is in state space form you also can use this function to re
17. delay 2 order 3 num den pade delay order lal e ae ian den This gives the following transfer function 1 VOUS 2T4160 00058 2 15 900sSTIS 000 l1 00085S 5T060 0008 2 v15 0008T1554000 MathScript Part Il Dynamic Systems 28 Time delay and Pade approximations We can also plot the step response step H This gives the following plot File Items Tools Help Graph Step Response dra Amplitude Time s We can also try with other orders in the approximation 3 order approximation 5 order approximation 10 order approximation File Items Tools Help Fle tems Tool Heb Fie items Took Heb Graph Step Response Graph f Step Response 1 24 1 2 i 0 6 0 6 47 1 1 i 1 i 0 025 as 0 75 1 125 1 5 175 2 2 2 Time s BA Svs Cicer ll eI M step H2 The step response becomes MathScript Part Il Dynamic Systems 29 Time delay and Pade approximations Step Response m a J gt n E Do ns me Da i 2 S 16 15 2 22 24 26 20 Time s gt As you can see with a higher order in the approximation we get closer to the exact result But a drawback the approximation gets very complex A higher order results in a more accurate approximation of the delay but also increases the order of the resulting model A large order can make the model too complex to be useful End of Example Example Given a 1 order t
18. eating state space models Function Description SS Constructs a model in state space form You also can use this function to convert transfer function models to state space form Sys order1 Constructs the components of a first order system model based on a gain time constant and delay that you specify You can use this function to create either a state space model or a transfer function model depending on the output parameters you specify Sys order2 Constructs the components of a second order system model based on a damping ratio and natural frequency you specify You can use this function to create either a state space model or a transfer function model depending on the output parameters you specify Example Given the following state space model klb Jkl ile y 0 E The MathScript code for implementing the model is Creates a state space model A HE S MI ij cs 07 enm C L 0 22 Example gt A NO 3 4 gt B 07 1 PI Ir gt ssmodel lt ss A B C SK ls ST 1 gt gt H sys orderl K T Po 0 5 gt wn 20 OE Uswscorder2 vwmnsm gt ssmodel ss A B C D 23 State space Models DESERO model s A B C n End of Example Theory State Space Models 3 2 Tasks Task 9 State space model Given a mass spring damper system Where c damping constant m mass k spring constant F u force The state space model for the system is 0 1 1 k A l i E e bs T m m
19. eering Workbench is a platform and development environment for a visual programming language from National Instruments The graphical language is named G What is MATLAB MATLAB is a tool for technical computing computation and visualization in an integrated environment MATLAB is an abbreviation for MATrix LABoratory so it is well suited for matrix manipulation and problem solving related to Linear Algebra MATLAB offers lots of additional Toolboxes for different areas such as Control Design Image Processing Digital Signal Processing etc What is MathScript MathScript is a high level text based programming language MathScript includes more than 800 built in functions and the syntax is similar to MATLAB You may also create custom made m file like you do in MATLAB MathScript is an add on module to LabVIEW but you don t need to know LabVIEW programming in order to use MathScript If you want to integrate MathScript functions built in or custom made m files as part of a LabVIEW application and combine graphical and textual programming you can work with the MathScript Node In addition to the MathScript built in functions different add on modules and toolkits installs additional functions The LabVIEW Control Design and Simulation Module and LabVIEW Digital Filter Design Toolkit install lots of additional functions You can more information about MathScript here http www ni com labview mathscript htm How do you start u
20. nction using the built in tf function as follows iW omi lom Lo lot 25 s 5 ISL OO dem lam am 1 SUL 2 so y GL aul 10 Transfer Functions H tf num den Example 1 Given the following transfer function 25 35 4 5 5s 4 9 MathScript Code momo den 5 9 H t num den 2 Given the following transfer function 45 35 4 5 s 5s 9 MathScript Code 4 OT OU SE TE den DP H t num den Note If some of the orders are missing we just put in zeros The transfer function above can be rewritten as 45 0 33 0 5 3353 4 H s 2 5s7 0 s 9 3 Given the following transfer function mass 7 3s 254 s 5s 652 MathScript Code DUUM gemere 5 Ol s H t num den MathScript Part Il Dynamic Systems 11 Transfer Functions End of Example Below we will learn more about 2 important special cases of this general form namely the 1 order transfer function and the 2 order transfer function 2 2 First order Transfer Functions A first order transfer function is given on the form SENE Ts 1 Where K isthe Gain T isthe Time constant Example Given the following transfer function H s STI In MathScript we will use the following code de dg den IN II H t num den We divide the transfer function in numerator and denominator and then we use the built in tf function We enter the code shown above in
21. nctions above using MathScript Plot the poles in the imaginary plane What are the stability properties of these systems Asymptotically stable system Marginally stable system or Unstable system Discuss the results Tip Use the built in functions poles and pzgraph MathScript Part Il Dynamic Systems 36 Stability Analysis gt Plot the impulse responses of these systems Discuss the results Tip Use the built in function impulse which is similar to the step function we have used before End of Task Task 16 Mass spring damper system Given a mass spring damper system Where c damping constant m mass k spring constant F u force The state space model for the system is iJ Je Case 1 Set k 2 m 20 c 4 Case 1 Set k 2 m 20 c 0 gt Investigate the stability properties of the system Impulse response and poles End of Task 5 4 Feedback Systems Here are some important transfer functions to determine the stability of a feedback system Below we see a typical feedback system MathScript Part Il Dynamic Systems 37 Stability Analysis c 5 lt co co c o c c cc m _ sc u y Process Sensor Control system Loop Transfer function The Loop transfer function L s Norwegian Slgyfetransferfunksjonen is defined as follows Where H s is the Controller transfer function H s is the Process transfer function H
22. ral commands in a sequence and save them as a file You execute these script files by clicking the green arrow in the toolbar This way you can easily save each task as an separate m file e g task1 m task2 m etc LabVIEW MathScript File Edit view Operate Tools Window Help ETT i ipt History For help enter help classes Se ayes Function apes inum 1 mtrput l den l 1 You see the results in p co Save your script the Output Window Execute your script pouces cine model Here you can enter several line of code that will be executed in a sequence MathScript MathScript is a high level text based programming language MathScript includes more than 800 built in functions and the syntax is similar to MATLAB You may also create custom made m file like you do in MATLAB MathScript is an add on module to LabVIEW but you don t need to know LabVIEW programming in order to use MathScript LabVIEW MathScript File Edit View Operate Tools Window Help Output Window Variables Script History For help enter help classes n E hn ak Textual Output MathScript Window Variables Script Command History Command Window Command Window 10 0 Idle Untitled Line 1 Column 1 What is LabVIEW LabVIEW short for Laboratory Virtual Instrumentation Engin
23. ransfer function with time delay ts H s e Ts 1 Where K 1 7 4 T 6 i e 25 H s 6 4s We want to find the step response for this system Method 1 We use the sys order1 function in order to get the exact solution K 1 T 4 delay 2 Haa mec Tec step H MathScript Part Il Dynamic Systems 30 The Step response becomes File Items Tools Help Graph 1 a a i p E Method 2 Let s try with a 5 order Pade approximation Time delay and Pade approximations Step Response l l 14 15 18 z2 z4 30 32 Time 5 Define Transfer function without delay num Ik dei E AE ii Gage en Define the delay order 5 H2 gt pade delay order Put them together H series Hl H2 The Step Response for the sytem step H The step response becomes MathScript Part Il Dynamic Systems 31 Time delay and Pade approximations File Items Tools Help Graph Step Response e el 0 5 oes lE 0 5 a zi i Ex E 0 4 13 0 2 l i0 145 15 Time s Method 3 We can also implement the same function using the tf function in combination with the set function like this eb is Sl eae OK UU UM H2 set H1 inputdelay delay step H2 This gives the exact solution as shown in method 1 End of Example 4 2 Tasks Task 12 Pade
24. response 1 Use different values for K e g K 0 5 1 2 Set 7 1 e Step response 2 Use different values for T e g T 0 2 0 5 1 2 4 Set K gt 1 Discuss the result optional Find the mathematical expression for the step response y t Use Pen amp Paper for this Assignment y s H s u s Where U u s Tip Use inverse Laplace and find the corresponding transformation pair in order to find y t Use the mathematical expression you found for the step response y t and Simulate it in MathScript using e g For Loop Compare the result with the result from the step function Create a simple sketch of step response where you mark K U and T T 3 Discuss the result End of Task Task 7 2 order system 2 order system The transfer function for a 2 order system is as follows Kos K He 5 s 2609s wo gt Wo PERT 0 Where e K isthe gain e zetaisthe relative damping factor e Wolrad s is the undamped resonance frequency gt Find the pole s MathScript Part Il Dynamic Systems 20 Transfer Functions gt Plot the Step response Use different values for e g 0 2 1 2 Set w 1 and K 1 Use the step function in MathScript Discuss the results End of Task Task 8 2 order system special case Special case When gt 0 and the poles are real and distinct we have K H6 oy Ds 1 We see that this system can be considered
25. sing MathScript You need to install LabVIEW and the LabVIEW IMathScript RT Module When necessary software is installed start MathScript by open LabVIEW gt Getting Started File Operate Tools Help 12010 New Latest from ni com Blank VI LabVIEW News 12 fe Empty Project LabVIEW in Action 15 by Real Time Project C3 More Example Programs 5 Training Resources 10 Online Support Open Discussion Forums p C ACDEx AirHeater lvproj tl M3 Student Information System lvpraj Code Sharing KnowledgeBase me MPC Example Setpoint profilez vi Request Support le Air Heater Setpoint profile vi Help mi 8 Air Heater2 Setpoint profile vi Getting Started with LabVIEW e mpc pid air heater vi Browse LabVIEW Help List of All New Features Targets i Q Find Examples Real Time Project v G g QA Find Instrument Drivers In the Getting Started window select Tools gt MathScript Window gt Getting Started Fie Operate MEME Help Measurement amp Automation Explorer Instrumentation ENEE Real Time Module MathscripE Window a DSC Module New IMAQ vision Latest from ni com Table of Contents PCMAG eve E ii POSS CG RN Tm ii SAELE DE S a E 22 E iii U je god eini iicc RR T Tem vi 1 COn ID cing Ree RR m 8 2 Kan
26. turn the step response of the model states This function assumes the initial model states are zero If you do not specify an output this function creates a plot Creates the linear simulation plot of a system model This function calculates the output of a system model when a set of inputs excite the model using discrete simulation If you do not specify an output this function creates a plot Constructs the components of a first order system model based on a gain time constant and delay that you specify You can use this function to create either a state space model or a transfer function model depending on the output parameters you specify Constructs the components of a second order system model based on a damping ratio and natural frequency you specify You can use this function to create either a state space model or a transfer function model depending on the output parameters you specify Returns the damping ratios and natural frequencies of the poles of a system model Constructs a proportional integral derivative PID controller model in either parallel series or academic form Refer to the LabVIEW Control Design User Manual for information about these three forms Computes the convolution of two vectors or matrices Connects two system models in series to produce a model SysSer with input and output connections you specify Connects two system models together to produce a closed loop model using negative or positive feedb
27. ve them as a file MathScript Part Il Dynamic Systems 13 Transfer Functions End of Task 2 3 Second order Transfer Functions A second order transfer function is given on the form Where K is the gain C zetaisthe relative damping factor Wo rad s is the undamped resonance frequency Theory 2 order Systems Example Given the following system H s numerator s 2s 3 S M denominator 4s 4 1 MathScript Code wona 2 3 den 4 1 H tf num den This gives the following output in MathScript PF Transter Function Input l utpur l 1 000s 2 2 000s 3 000 4 0008 1 000 Continuous time model End of Example MathScript Part Il Dynamic Systems 14 Transfer Functions Step Response For a 2 order system we have the following step responses depending on Value Type of step response y Real and distinct Overdamped 15 Im 0 5 0 0 5 10 f Critically damped Real and multiple Complex conj Im X X Re Undamped Imaginary Im Re Unstable Pos real part Im Re Task2 2 order gt Define the transfer function below using the tf and the sys order2 functions 2 different methods that should give the same results H s gt Set K 1 09 1 gt Plot the step response use the step function in MathScript for different values of Select as follows MathScript
28. ynamic system has one of the following stability properties e Asymptotically stable system e Marginally stable system e Unstable system Below we see the behavior of these 3 different systems after an impulse Asymptotically stable system lim h t 0 Marginally stable system 0 lt lim h t oo Unstable system lim h t oo 33 34 Stability Analysis 5 2 Poles The poles is important when analysis the stability of a system The figure below gives an overview of the poles impact on the stability of a system Left half plane Right half plane Re ZY Asymptoticallystable pole area Thus we have the following Asymptotically stable system Im Each of the poles of the transfer function lies strictly in the left half plane has strictly negative real part Re Marginally stable system Im One or more poles lies on the imaginary axis have real part equal to zero and all these poles are distinct Besides no poles lie in the right half plane Re MathScript Part Il Dynamic Systems 35 Stability Analysis Unstable system At least one pole lies in the right half plane has real part Im greater than zero Re Im Re Or There are multiple poles on the imaginary axis 5 3 Tasks Task 15 Stability Analysis Given the following transfer functions 1 H s s 1 H s ul e 1 H s E 1 io gt Find the poles for the different transfer fu

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書の表示  Page 1 Page 2 Page 3 Page 4 面強圧性能 ー 耐久性能に優れた高  Ricoh Aficio IS 2315 User's Manual  DeLonghi DUH1000 Fan User Manual    STIHL RE 108, 118, 128 PLUS  Radio Shack 32-2038A User's Manual  336RE  Handbuch Deutsch  Small Business Suite  

Copyright © All rights reserved.
Failed to retrieve file