ME 365 EXPERIMENT 6 SYSTEM IDENTIFICATION Objectives: This experiment examines commonly used techniques for identifying systems in both the time and frequency domains. System identification is an important step in developing mathematical models to be used for systems and control design. In this experiment, we will be studying a group of systems and estimating the model parameters that best characterize them. It should be noted that system identification techniques may also be used to estimate the structure, or order, of the model. Here we will be assuming that the systems are characterized by ideal second order frequency response functions. After completing this lab, you should be able to: • Use time domain techniques to experimentally determine the parameters of a second order system. • Use frequency domain techniques to experimentally determine the parameters of a second order system. • Conclude which identification techniques provide the best estimates of the system parameters and under what circumstances they work best. Procedure: RLC Circuit: In this laboratory, we will be identifying the model parameters associated with the RLC circuit, shown in Figure 1, which exhibits primarily second order behavior. R Vin L = 4.5 H C = 0.01 F Vout R=0 1K 10 K 100 K Figure 1: The RLC Circuit Used in this Laboratory Similar mechanical systems, e.g. a mass/spring/damper, often modeled as ideal second order systems, may in actuality be better characterized by higher order systems and are often subject to nonlinearities. It is for this reason that we will practice our system identification techniques on the "better behaved" RLC circuit. That is not to say that Laboratory 6 System Identification ME 365 these techniques have no use for complex systems. They may be used to determine the dominant nature of the response and the overall system order, albeit with some care. Time Domain System ID: Build the circuit as shown using the first resistor, in the case of R = 0 , a simple wire connection will suffice. Apply a 5 Hz, 2 volt RMS square wave signal to the input of the circuit, and attach the output of the circuit to the oscilloscope and channel 0 of the data acquisition interface board. The low frequency square wave acts like a series of step inputs to your second order system. Observe the output on the oscilloscope to make sure that the circuit response is behaving as you would expect. Launch LabVIEW then load SYSTEM ID.VI from the Desktop\ME365 directory. This VI extracts and analyzes a single step response from the circuit, which is being excited by the square wave. The default panel settings should produce acceptable results for most setups, however, you may find it useful to modify some of the VI inputs. Here is a brief description of what the VI inputs do: Time Out: This knob determines the amount of time that can elapse before the VI "gives up" trying to find a good step response. # of Samples: This value governs the number of data points to be collected. NOTE: This VI performs some numerical calculations that require this value to be a power of two. Sample Rate: This is simply the sample rate at which data is acquired. Trigger Level: This is the threshold voltage level that the VI looks for when determining if a step response is beginning. If the trigger level is set higher than the largest output, the VI will never trigger! Pretrigger Scans: This represents the number of data points immediately before a step occurs that should be retained with the response data. Save to File: This switch allows you to save the step response data to a file for later analysis in Excel or MATLAB. After you finish collecting data using SYSTEM ID.VI, use the percentage overshoot and log decrement techniques described in the system identification chapter of your course notes to determine and n for your system. Record these values in the space provided on the worksheet. Also compute and record the parameters using the expression for percent overshoot and the damped natural period of the step response. Complete the time domain worksheet by recording the theoretical values of and n for the four circuits. -2- Laboratory 6 Q1) System Identification ME 365 Discuss any discrepancies between your theoretical and experimental results. For each of the four cases, list which method you think provides the best estimate and why. Frequency Domain System ID: Reconstruct the circuit used in the time domain portion of this laboratory. Connect the output of the function generator to the input of the circuit as well as channel 1 on the oscilloscope and channel 3 on the data acquisition interface. Likewise, the output of the circuit should be connected to channel 2 on the scope and channel 4 on the data acquisition interface. Set the oscilloscope on X-Y mode in order to observe the Lissajous figure we studied in Lab 1. The FM (frequency modulation) function of the function generator will be used for the frequency domain identification. Set the function generator to provide a 1500 Hz sinusoidal signal with 1 Volt RMS value and zero offset. Press the Mod button on the function generator, set the Type to FM, set the Source to Ext, and Freq Dev to 1500 Hz. Finally, connect DA0 on the data acquisition interface to the input marked Modulation In, on the BACK of the function generator. The voltage applied to Modulation In controls the frequency of the function generator’s output, thus we can produce a variety of sine waves with the same amplitude by varying the applied voltage. Use the settings above, a voltage range of -5-5 volts produces a frequency range of 0 to 3000 Hz. Launch LabVIEW then load BODE_MANUAL.VI from the Desktop\ME365 directory. This VI produces a range of output voltages that control the function generator frequency, and computes the change in magnitude and phase between the input and output signals at each frequency. The default panel settings should produce acceptable results for most setups, however, you may find it useful to modify some of the inputs. Here is a brief description of what the VI inputs do: # of Points: This is the number of frequencies that will be tested. Using more points will improve the detail on your Bode plot, especially near any resonant peaks. Sample Rate: This is the sample rate at which data is acquired. # of Samples: This represents the number of data points that will be used to sample the input and output signals at each frequency for phase and magnitude comparison. -3- Laboratory 6 System Identification ME 365 Delay: This switch controls whether or not a delay will occur between changing the signal frequency and computing the resulting phase and magnitude change. Recall that frequency response analysis considers only the steady state solution. Delay Time: This is the amount of time to pause before determining the phase and magnitude change between input and output. This has no effect if the delay feature is turned off. Save to File: This switch allows you to save the frequency response data to a file for later analysis in Excel or MATLAB. Drive Channel: This is the channel number you attached the input to. Response Channel: This is the channel number you attached the output to. Limits: These are the upper and lower voltage limits for the channels. The panel outputs consist of Bode (magnitude and phase) plots which relate the input and output signals over a range of frequencies. You may wish to rescale the Bode plots by highlighting and retyping values on the axes. Run the VI and save the resulting Bode plots for each of the four resistance values. Observe the rotating Lissajous figure as the Bode plot is being generated. Your TA may request that you print the front panel of the VI or plots of the phase and magnitude using Excel or MATLAB. Use the frequency response data to compute and n using the "half power" and "slope of phase angle" methods. Please note that to obtain an accurate natural frequency using the Lissajous figure, you need to disable the FM function and manually adjust the frequency of the sinusoidal input signal. Record your results in the appropriate spaces on the frequency domain worksheet. Q2) Are the results of your frequency domain system identification consistent with the theoretical values you expected? Q3) Are they consistent with your time domain identification results? Do either of the two frequency domain methods ever provide a better estimate? Explain. -4- Laboratory 6 Q4) System Identification ME 365 Provide an explanation as to why the identification techniques failed for any of the systems. Hint: What assumptions are made by the methods? -5- Laboratory 6 System Identification ME 365 System Identification Theoretical Results Worksheet Theoretical R n d 0 1K 10 K 100 K System Identification Time Domain Worksheet Log Decrement R % O.S. & d n d n 0 1K 10 K 100 K System Identification Frequency Domain Worksheet R Half Power Phase Slope ζ ζ n 0Ω 1 KΩ 10 KΩ 100 KΩ -6- n Lissajous n