Search for question
Question

/n UAEU Department of Mechanical and Aerospace Engineering جامعة الإمارات العربية المتحدة United Arab Emirates University MECH 350 Introduction to Mechatronics – Spring 2024 - Objectives Lab 3: Frequency Response of First-Order RC-Circuit Systems After working on this lab, the students will be able to, 1) Simulate the frequency response of an RC-circuit using ode45, 2) Find the Amplitude and Phase from the time response and convert the amplitude ratio (AR) to decibels, 3) Plot the Amplitude Ratio and Phase versus Frequency on a semilog graph. Introduction: The frequency response of dynamic systems involves relating the magnitude and phase of the system to the frequency of the sinusoidal input. This is usually done in a graphical form representation. The frequency response is widely used in the design and analysis of systems, including control and vibration systems. Lab Tasks Task 1: Simulation of RC-Circuit Software Used in this task: • MATLAB or Octave (You might need to load the control toolbox to use bode()) Using ode45(), develop a simulation for MATLAB/Octave to simulate the response of the RC circuit shown in Figure 1 when a sinusoidal input v¡ = A; sin (wt) is applied. The values of R and C are given as 10 KM and 10 µF respectively. For each value of @ shown in Table 1, run the simulation and plot t versus Vi and Vo. R C Vin V Figure 1: R-C Circuit From the plots find A。, in volt, and the delay, in seconds, between Vo and Vi. Find AR and convert it to decibel. Calculate the phase from the delay and convert it to degree. Table 1: Frequency response data @ Ao (Volt) (rad/sec) 0.2 0.5 0.8 2 5 8 20 50 80 200 500 800 AR AR (decibel) Delay (sec) Phase (degree) Task 2: Plotting of the frequency response Generate the amplitude ratio and phase for the system from the transfer function using the bode () function. First, generate the frequency data points using the logspace() function. Then, define the system as a transfer function. Use the function bode() to generate the magnitude and phase. Convert the mag and phase to one-dimensional arrays in units of decibels and degrees, respectively. Plot the result on a two-graph figure using the semilogx() plotting function. The needed functions (in MATLAB) are shown below. For Octave, the same functions will probably work. w=logspace(-1, 3); sys = tf(1, [R*C 1]) [Mag, Ph] = bode(sys, w); for i=1:length(w) AR(i)=20*log10(Mag(1,1,i)); Phase(i)=Ph(1,1,i); end subplot(211) semilogx(w, AR) subplot(212) semilogx(w, Phase) Task 3: Comparing with the simulation results On the same figure generated in Task 2, plot o versus AR in decibel and Phase in degrees that are obtained in Task 1 and tabulated in Table 1. Use '*' to plot the 12 data points. Compare the two sets of data and discuss your findings.