MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab 1 Introduction To provide understanding of the requirements for a computational model of a dynamic system 1 1 Objective s 1 Understand mathematical models of simple systems that represent a large number of real world systems 2 Apply Matlab to understanding how these systems behave to various inputs 3 Understand how a system s response to various inputs is used to determine system parameters mass stiffness damping inertia etc 1 2 Learning Outcomes At the end of performing this laboratory exercise the student will be able to 2 Use Matlab to analyze the response of various systems to various inputs Dynamic Models 2 1 Translational Motion Cruise Control Example 2 1 Franklin 2 1 1 Objectives 1 Write the equations of motion for the forward speed and position of the automobile 2 Take the Laplace transform of the resulting differential equation and solve for the transfer function between the input and output 3 Use Matlab to find the response of the velocity of the automobile to a step input at t 0 of u 500N Parameters for the simulation m 1000kg viscous drag coefficient b 50 N sec m 2 1 2 Assumptions 1 Neglect rotational inertia of wheels etc 2 All dissipative forces friction viscous drag etc represented as being proportional to the automobiles speed 2 1 3 Solution Figure 1 Free body Diagram of Automobile Cruise Control Problem 1 MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Sum forces 1 2 Rearrange 3 Convert from position to velocity 4 Take the Laplace Transform 5 Rearrange 6 Plot the step response using Matlab MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Figure 2 Response of Automobile Velocity to Step Response of 500 N 2 2 Rotational Motion DC Motor Example 2 13 3 17 Franklin 2 2 1 Objectives 1 Write the equations of motion for a DC Motor with its electrical circuit velocity and position 2 Take the Laplace transform of the resulting differential equation and solve for the transfer function between the input and output 3 Use Matlab to analyze the response of the velocity of the DC motor to a step input 2 2 2 2 2 3 Assumptions The system has an inertia Im and viscous friction coefficient b Solution MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Figure 3 Free Body Diagram of a DC Motor 1 Sum forces 7 8 9 10 Analysis of electrical circuit 11 Laplace transform and combining Equations 10 and 11 we arrive at the transfer function for the motor 12 Rearranging 13 Neglecting the motor inductance 14 Laplace transform transfer function note the back EMF term in damping 15 Where 16 17 In many cases a transfer function between the motor input and output velocity a 0m is required 18 MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Table 2 DC Motor Parameters 2 U 0 01 kg m b 0 001 N m s La lH Ra 10Cl KT Ke 1 Motor Inertia Motor Damping Constant Motor Coil Inductance Motor Coil Resistance Motor Torque and Back EMF Constants Un neglecting motor inductance using Equation 13 19 20 Table 3 Matlab Code m file to Produce Step Response of Motor Position Equation 19 numerator num 100 denominator den 1 10 1 101 0 define system sys tf num den define time vector t 0 0 01 5 compute step response y step sys t plot step response plot t y plot annotations grid on xlabel Time sec ylabeK theta rad title DC Motor Step Response MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Figure 4 Response of DC Motor Position to Step Input Equation 19 Table 4 Matlab Code m file to Produce Step Response of Motor Velocity Equation 20 num 100 den 1 10 1 101 sys tf num den t 0 0 01 5 y step sys t plot t y grid on xlabel Time sec ylabel omega rad sec title DC Motor Step Response numerator denominator define system define time vector compute step response plot step response plot annotations MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Figure 5 Response of Motor Velocity to Step Input Equation 20 3 Determining Parameters Experimentally MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab Figure 6 Points Required to Experimentally Determine Damping Ratio and Damped Natural Frequency d fd 3 1 Damping Ratio Logarithmic Decrement 21 22 The Damping Ratio 3 2 Natural Frequency d n fd fn Damped natural frequency 23 Natural frequency 24 4 References th m 1 Franklin G F Powell D J Emami Naeini A 2010 Feedback Control of Dynamic Systems 6 Edition Pearson Higher Education Upper Saddle River NJ 07458 MAE 405 Dynamics Control Laboratory Lab 1 Introduction to Matlab 5 Lab Exercise Given the following dynamic system Figure 7 Single Degree of Freedom Mass Spring Damper Dynamic System 1 Draw a free body diagram and solve for the equation of motion 2 Use the Laplace transform to solve for the transfer function between position and force 3 Given the following parameters use Matlab to generate a step response and an initial condition response Note a state space representation of the equation of motion is required to use the Matlab initial function 4 m 0 5 kg k 125 N m b 0 80 N s m t 0 0 0001 6 F0 t 0 10 N Step Response x t 0 0 03 m Initial Condition Response x t 0 0 m s Initial Condition Response From this response experimentally determine the damping ratio damped natural frequency d fd ar d tne natural frequency con fn 5 Short report requirements Free body diagram Equation of motion Laplace transfer function and state space A B C and D matrices Two plots both fully annotated including units x label y label and title i Step response ii Initial condition response Indicate points used to calculate damping ratio and damped natural frequency tO tl xO and xl both on the plot and in a table Table displaying theoretical and experimental values damping ratio damped natural frequency a d and the natural frequency con fn Discussion i What was learned ii Why is this important and how can this knowledge be applied to larger problems Include m file as appendix make sure to use comments to aid understanding
View Full Document