Repository navigation
Linearizing a model that contains discrete callbacks (synchronous / clocked subsystems) #5166
Copy link
Copy link
Open
Description
Goal
Linearize a model with a synchronous (clocked) subsystem, and obtain the
loop transfer, the sensitivity functions and the stability margins of the sampled-data loop the way
linearize already gives them for a purely continuous model.
Synchronous programs are lowered to discrete callbacks, so the question is really about linearizing a
model that contains them. linearize today builds its LinearizationFunction from the continuous
problem and takes no account of callbacks, so a model with a clocked controller linearizes to the
plant with the controller's contribution missing. Nothing warns; the result looks like a plant that
happens to be open loop.
- The single periodic clock case is the tractable one to start from. With one periodic clock the
closed loop is a linear time-invariant discrete system at that period, and its behaviour between
samples is a hold — the textbook sampled-data setting, and enough for most control designs. - We would like an arbitrary number of periodic callbacks to be handled eventually. Real models
have more than one rate. For example a controller at 60 s, and
a Functional Mock-up Unit every 600 s. Multi-rate loops
where the periods are commensurate seem like the natural next step after the single-clock case.
Possible approaches:
- For periodic callbacks that all have a common multiple clock interval
Tc, linearize what's effectively (pseudo code)solve(prob, span=(t0, t0+Tc)[unknowns(ssys)]a similar for the output map. Clocks with non-zero phase offsets will be a pain. Interesting theoretical exercise to figure out how to interpret this. - Linearize continuous and clocked partitions separately and construct the loop-transfer function manually. This requires treating all the partition inputs and outputs as linearization inputs and outputs and outputing also these connection maps for the subsequent call to
feedbackto assemble. The linearizations of clocked partitions can then be converted withd2cto continuous time and then the final result combined in continuous time. Care must be taken when interpreting this result w.r.t. the Nyquist frequencies involved. - If one
Tsis much longer than others, we don't want to limit the Nyquist freq based on this, thed2capproach seems much better in that case, with the appropriate precautions in interpreting the result. - No matter the approach, a downstream analysis ought to check that all signals crossing a sampler boundary have very little frequency content above that boundary's Nyquist freq.. A component being lowpass is not sufficient since frequency folding happens at the sampling interface before it. The
d2capproach requires this property to be at all reliable, theTcdoes not strictly need this, folded frequencies are correctly handled, but frequency localization will be poor and determined by the longTc, so interpretation may be difficult. This indicates that returning all clock partitions as independent systems is the right way to go so that they can be analyzed in isolation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Add `linearize_hybrid` for partition-wise linearization of clocked sy…