On 9/14/2009 10:48:44 AM, baxterl wrote:
>Simulating a simple
>analog-input digital-output
>feedback loop; Input is a
>vector of 1024 scalars
>representing an analog signal.
>It gets a one-sample-delayed
>output signal subtracted, then
>rounded to simulate ADC
>quantization error, then
>integrated once or twice. The
>integrator output is the
>system output and gets
>quantized to represent a DAC
>and fed back, forming a
>first-order feedback loop with
>a gain of 1.
>
>Any ideas about the best way
>to handle this?
>
>...Larry
_____________________________
You have interpreted too many things. Simulation is simulation, it means that on the physics of the system the loop is closed on some form of PID and attempting for the tuning of the system within some constrain [best time recovery, minimal OFF setpoint excursion ...]. The physical closed loop is a much different story. You will have 3, 5 measured values in hand. Those measured values are the deviation from the actual set point and the measured PV [Process variable]. At each loop scan, the pile pushes down by one value ... etc. Those values from the "sample & hold" accumulator are then passed in the PID numerical module, thus the PID module is updated constantly at each loop scan, it contains 3 or 5 "accumulated values" available for the point numerical derivative and/or the point numerical integrate. Conclusively, at each loop scan the "sample & hold" accumulator is updated, the P, I, D up dated too and a single combined PID summed to the output of the controller... the loop is closed, live and stands alone, doing the best control if all things are tuned correctly and applied correctly from the knowledge base of the designers.
What all that means is that there is no such vector of 1024 (or else 2048, 4096,,,,) vector of values, no such round OFF,,, but only one value in the decimal steps of the digitizer of the system. Your explanation is of nature to get any "man of the trade" lost !
If you have a vector of values from the DAC [Data Acquisition], and want to reconstruct the loop back and how it had reacted over the time period of the accumulation, that is possible but of no great use, of no use at all as the reconstruct does not reconstruct over the actual controlling device (generally the control valve) and the dynamics of the system.
The attached is 1/23 work sheets in Mathcad control system. You will surely need more explanations but unfortunately this forum can't replace the academic tutorial. If you have some project, better describe what it is about, rather than telling what it's doing or attempting to do.
jmG