Download Presentation
## Dynamic Experiments

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Dynamic Experiments**Maximizing the Information Content for Control Applications J. McLellan**Outline**• types of input signals • characteristics of input signals • pseudo-random binary sequence (PRBS) inputs • other input signals • inputs for multivariable identification • input signals for closed-loop identification J. McLellan**Types of Input Signals**• deterministic signals • steps • pulses • sinusoids • stochastic signals • white noise • correlated noise • what are the important characteristics? J. McLellan**Outline**• types of input signals • characteristics of input signals • pseudo-random binary sequence (PRBS) inputs • other input signals • inputs for multivariable identification • input signals for closed-loop identification J. McLellan**Important Characteristics**• signal-to-noise ratio • duration • frequency content • optimum input (deterministic / random) depends on intended end-use • control • prediction J. McLellan**Signal-to-Noise Ratio**• improves precision of model • parameters • predictions • avoid modeling noise vs. process • trade-off • short-term pain vs. long-term gain • process disruption vs.expensive retesting / poor controller performance • note - excessively large inputs can take process into region of nonlinear behaviour J. McLellan**Example - Estimating 1st Order Process Model with RBS Input**confidence intervals are tighter with increasing SNR - 1 0 . 6 q + = + y ( t 1 ) u ( t ) a ( t ) True model - 1 - 1 0 . 75 q Step Response 4 1:1 3.5 10:1 3 more precise estimate of transient less precise estimate of steady state gain 2.5 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 40 J. McLellan Time**Example - Estimating First-Order Model with Step Input**Step Response 6 more precise estimate of gain vs. RBS input 5 1:1 less precise estimate of transient 4 10:1 3 2 1 0 -1 -2 response 0 5 10 15 20 25 30 35 40 Time 99% confidence interval J. McLellan**Test Duration**• how much data should we collect? • want to capture complete process dynamic response • duration should be at least as long as the settling time for the process (time to 95% of step change) • failure to allow sufficient time can lead to misleading estimates of process gain, poor precision J. McLellan**Test Duration**Precision of a dynamic model improves as number of data points increases • additional information for estimation as test duration increases, bias decreases and precision increases Step Response 4 3.5 3 2.5 2 1.5 10 time steps 1 30 time steps 0.5 response 0 99% confidence interval 50 time steps -0.5 -1 0 5 10 15 20 25 30 35 40 Time J. McLellan**“Dynamic Content”**• what types of transients should be present in input signal? • excite process over range of interest • model is to be used in controller for: • setpoint tracking • disturbance rejection • need orderly way to assess dynamic content • high frequency components - fast dynamics • low frequency components - slow dynamics / steady-state gain J. McLellan**Frequency Content - Guiding Principle**The input signal should have a frequency content matching that for end-use. J. McLellan**Looking at Frequency Content**• ideal - match dynamic behaviour of true process as closely as possible • goal - match the frequency behaviour of the true process as closely as possible • practical goal - match frequency behaviour of the true process as closely as possible, where it is most important J. McLellan**Experimental Design Objective**Design input sequence to minimize the following: design error in importance æ ö æ ö æ ö = ´ ç ÷ ç ÷ ç ÷ è ø è ø è ø cost predicted frequency response function difference in predicted vs. true behaviour - function of frequency, and the input signal used our design objectives J. McLellan**Accounting for Model Error - Interpretation**Optimal solution in terms of frequency content: high very important * spectral density spectral density J= low not important frequency frequency error in model vs. true process importance to our application J. McLellan**Accounting for Model Error**Consider frequency content matching Goal - best model for final application is obtained by minimizing J - w - w j T j T 2 = - w w $ J G ( e ) G ( e ) C ( j ) d ò } } frequency range importance of matching - weighting function bias in frequency content modeling J. McLellan**Example - Importance Function for Model Predictive Control**require good estimate of steady state gain, slower dynamics spectral density high frequency disturbance rejection performed by base-level controllers - > accuracy not important in this range frequency J. McLellan**Desired Input Signal for Model Predictive Control**• sequence with frequency content concentrated in low frequency range • PRBS (or random binary sequence - RBS) • step input • will provide for good estimate of gain, but not of transient dynamics J. McLellan**Control Applications**For best results, input signal should have frequency content in range of closed-loop process bandwidth • recursive requirement! • closed-loop bandwidth will depend in part on controller tuning, which we will do with identified model J. McLellan**Control Applications**One Approach: Design input frequency content to include: • frequency band near bandwidth of open-loop plant (~1/time constant) • frequency band near desired closed-loop bandwidth • lower frequencies to obtain good estimate of steady state gain J. McLellan**Frequency Content of Some Standard Test Inputs**frequency power low frequency - like a series of long steps high frequency - like a series of short steps J. McLellan**Frequency Content of Some Standard Test Inputs**Step Input power is concentrated at low frequency - provides good information about steady state gain, more limited info about higher frequency behaviour power 0 frequency J. McLellan**Example - Estimating First-Order Model with Step Input**Step Response 6 more precise estimate of gain vs. RBS input 5 1:1 less precise estimate of transient 4 10:1 3 2 1 0 -1 response -2 0 5 10 15 20 25 30 35 40 99% confidence interval Time J. McLellan**Frequency Content of Some Standard Test Inputs**White Noise • approximated by pseudo-random or random binary sequences power is distributed uniformly over all frequencies - broader information, but poorer information about steady state gain power ideal curve frequency J. McLellan**Example - Estimating 1st Order Process Model with RBS Input**1:1 Step Response 4 3.5 10:1 3 more precise estimate of transient less precise estimate of steady state gain 2.5 2 1.5 1 0.5 response 0 99% confidence interval 0 5 10 15 20 25 30 35 40 Time J. McLellan**Frequency Content of Some Standard Test Inputs**Sinusoid at one frequency power concentrated at one frequency corresponding to input signal - poor information about steady state gain, other frequencies power frequency J. McLellan**Frequency Content of Some Standard Test Inputs**Correlated noise • consider 0 . 1 = u u corr white - 1 - 1 0 . 9 q variability is concentrated at lower frequencies - will lead to improved estimate of steady state gain, poorer estimate of higher frequency behaviour power frequency J. McLellan**Persistent Excitation**In order to obtain a consistent estimate of the process model, the input should excite all modes of the process • refers to the ability to uniquely identify all parts of the process model J. McLellan**Persistent Excitation**Persistent excitation implies a richness in the structure of the input • input shouldn’t be too correlated Examples • constant step input • highly correlated signal • provides unique info about process gain • random binary sequence • low correlation signal • provides unique info about additional model parameters J. McLellan**Persistent Excitation - Detailed Discussion**• Example - consider an impulse response process representation • formulate estimation problem in terms of the covariances of u(t) • can we obtain the impulse weights? • consider estimation matrix • persistently exciting of order n - definition • spectral interpretation J. McLellan**Persistence of Excitation**• Add in defn in terms of covariance - J. McLellan**Outline**• types of input signals • characteristics of input signals • pseudo-random binary sequence (PRBS) inputs • other types of input signals • inputs for multivariable identification • input signals for closed-loop identification J. McLellan**Pseudo-Random Binary Sequences**(PRBS Testing) J. McLellan**What is a PRBS?**• approximation to white noise input • white noise • Gaussian noise • uncorrelated • constant variance • zero mean • PRBS is a means of approximating using two levels (high/low) J. McLellan**PRBS**• traditionally generated using a set of shift registers • can be generated using random numbers • switch to high/low values • generation by finite representation introduces periodicity • try to get period large relative to data length J. McLellan**PRBS Signal**Alternates in a random fashion between two values: prbs input input magnitude 2 test duration 1.5 1 0.5 0 value -0.5 -1 minimum switching time -1.5 -2 0 20 40 60 80 100 time step J. McLellan**How well does PRBS approximate white noise?**Compare spectra: spectrum for 100 point PRBS signal theoretical spectrum for white noise 1 10 0 10 power 1 . minimum switch time note concentration of PRBS signal in lower frequency range -1 10 -2 -1 0 1 2 10 10 10 10 10 • frequency J. McLellan**PRBS Design Parameters**Amplitude • determines signal-to-noise ratio • precision vs. process upsets • large magnitudes may bring in process nonlinearity as more of the operating region is covered • could result in poor model because of • estimation difficulties - e.g., gains, time constants not constant over range • model selection difficulties - lack of clear indication of process structure J. McLellan**PRBS Design Parameters**Minimum switch time • shortest interval in which value is held constant • value is sampling period for process • rule of thumb -> ~20-30% of process time constant • influences frequency content of signal • small -> more high frequency content • large -> more low frequency content J. McLellan**PRBS Design Procedure**• select amplitude • two levels • decide on desired frequency content • high/low • shape frequency content by • adjusting minimum switching time OR by filtering PRBS with first-order filter OR by modifying PRBS to make probability of switching ¹ 0.5 J. McLellan**Other PRBS Design Parameters - Switching Probability**• another method of adjusting frequency content • given a two-level white noise input e(t), define input to process as • as increases, input signal switches less frequently --> lower frequencies are emphasized - a u ( t 1 ) with probabilit y ì = u ( t ) í - a e ( t ) with probabilit y 1 î J. McLellan**Switching Probability ...**• as increases to 1, starts to approach a step • this approach shapes frequency content by introducing correlation • same correlation structure can be introduced using first-order filter J. McLellan**Manual vs. Automatic PRBS Generation**• PRBS inputs can be generated automatically • using custom software • using Excel, Matlab, MatrixX, Numerical Recipes routine, ... • shaping frequency content is usually an iterative procedure • select design parameters (e.g., switching time) and assess results, modify as required • select filter parameters J. McLellan**Manual Generation**• sequence of step moves determined manually • can resemble PRBS with appropriate design parameters • gain additional benefits beyond single step test • recommended procedure • decide on a step sequence with desired frequency content BEFORE experimentation • modify on-line as required, but assess impact of modifications on input frequency content and thus information content of data set J. McLellan**A final comment on frequency content...**Increasing low frequency content typically introduces slower steps up/down • brings potential benefit of being able to see initial process transient • provides an indication of time delay magnitude J. McLellan**Outline**• types of input signals • characteristics of input signals • pseudo-random binary sequence (PRBS) inputs • other types of input signals • inputs for multivariable identification • input signals for closed-loop identification J. McLellan**What other signals are available & when should they be used?**Sinusoids • particularly for direct estimation of frequency response • introduce combination of sinusoids and reconstruct frequency spectrum • a sequence of steps of the same duration has same properties • danger - difficult to “eyeball” delay because no sharp transients J. McLellan**What other signals are available, and when should they be**used? Steps and Impulses • represent low frequency inputs • useful for direct transient analysis • indication of gain, time constants, time delays, type of process (1st/2nd order, over/underdamped) • step inputs • good estimate of gain • less precise estimate of transients J. McLellan**Outline**• types of input signals • characteristics of input signals • pseudo-random binary sequence (PRBS) inputs • other types of input signals • inputs for multivariable identification • input signals for closed-loop identification J. McLellan**Dealing with Multivariable Processes**Approaches • Perturb inputs sequentially and estimate models for each input-output pair (SISO) • Perturb all inputs simultaneously and estimate models for a given output (MISO) • using independent input test sequences • using correlated input test sequences • Perturb all inputs simultaneously and estimate models for all outputs simultaneously (MIMO) J. McLellan