The invention relates to simulation systems for simulating systems or subsystems, and more particularly to interaction processes for two or more simulation models or packages within such simulation systems.
A simulation system comprises an electronic computer-based simulation of a complex physical system. A simulation system may comprise multiple simulations, each of which may comprise simulated parameters or subsystems of the simulated physical system. Co-simulation allows for two or more simulations of the simulation system to interact with each other. In practice, such co-simulation generally comprises a co-simulation interface between software packages, each software package serving as a distinct simulation.
The invention generally comprises a method of communication and interaction between multiple simulations of a complex simulation system, each simulation comprising a model of a physical subsystem or parameter of the complex simulation system, comprising the steps of: transmitting from at least one transmitting simulation an output of its model to generate a simulation output signal; attenuating the simulation output signal above a maximum desired communication frequency between the simulations to generate a corresponding filtered simulation output signal; sampling the filtered simulation output signal at a sampling rate with a frequency at least twice the maximum desired communication frequency to generate a corresponding sampled output signal; transferring the sampled output signal from the transmitting simulation to at least one receiving simulation; conditioning the sampled output signal to generate a simulation input signal; and transferring the simulation input signal to the model of the receiving simulation.
Co-simulation for the simulation system 2 requires interaction between its component simulations 4. Such interaction requires bi-directional communications between the component simulations 4 by way of a co-simulation interface 8 that couples the simulations 4, such as by communication buses 10. In practice, the co-simulation interface 8 transfers between the component simulations 4 samples of simulation signals that each component simulation 4 generates.
Operation in a discrete-time domain allows the simulations 4 to communicate with each other over the co-simulation interface 8 using a single communication channel with time domain multiplexing. However, such discrete-time domain operation requires sampling of the simulation signals of the simulations 4 as part of the time domain multiplexing process.
The key issue in specifying the sample rate of such simulation signal sampling is the understanding of the simulation and simulation objectives in order to determine the maximum frequency content conveyed between the component simulations. The Nyquist Limit requires that the sample frequency must be at least a factor of two higher than the maximum desired frequency of the sampled simulation signals, and it is typically an order of magnitude higher, or ten times, the maximum desired frequency of the sampled simulation signals. For example, communication of a simulation signal from one simulation 4 to another simulation 4 over the co-simulation interface 8 with a maximum desired frequency of 100 Hz requires a sampling rate greater than or equal to 200 Hz. With 200 Hz sampling, the Nyquist Frequency is 100 Hz. This permits communication of the 100 Hz simulation signal in the form of a simple square wave. A more complex signal with a fundamental frequency of 100 Hz would require a much higher sampling rate to accurately preserve amplitude and phase information. Depending on fidelity requirements, such a 100 Hz waveform may require a sample rate of 1000 Hz or more.
If a discrete-time control system comprises one of the simulations 4 in the simulation system 2, then there is an additional constraint in selecting the sample rate. In this case, the communication rate between the simulation 4 with a discrete-time controller model and the simulations 4 that represent the remaining models in the simulation system 2 should be an integer multiple of the selected discrete-time sample rate. For example, if the co-simulation interface 8 interfaces a simulation 4 with a continuous time domain model with another simulation 4 with a discrete-time controller model that has a sample rate of 10 kHz, then the communication rate should be the same as the sampling rate or an integer multiple thereof. If there are additional simulations 4 with continuous time domain models in the simulation system 2, the communication rate may then be an integer number of the sampling rate, depending on the required fidelity between the simulations 4 with continuous time domain models.
A sampler 18 receives the filtered simulation output signal xf(t) on the anti-alias filter output line 16 and samples and holds values of the filtered simulation output signal xf(t) at a selected sampling rate k with a frequency of at least the Nyquist Rate, or 2f to produce a sampled simulation output signal Xf(k) on a sampler output line 20.
The co-simulation interface 8 receives the sampled simulation output signal from the sampler output line 20 and transfers it to another simulation 4 by way of respective communication buses 10. A signal reconstruction filter 22, typically a low-pass filter, may receive the sampled simulation output signal from its respective communication bus 10 on a reconstruction filter input line 24. The signal reconstruction filter 22 may filter or smooth the sampled simulation output signal that it receives as a continuous time domain to produce a simulation input signal on a reconstruction filter output line 26. The model 6 receives the simulation input signal on the reconstruction filter output line 26, thereby letting the models 6 of the simulations 4 to communicate and interact.
A disadvantage to the simulation system 2 is required bandwidth of the co-simulation interface 8 and the communications buses 10. If a model 6 of a simulation 4 has continuous time domain output signal with an alternating current (AC) characteristic with a relatively high fundamental frequency, the co-simulation interface 8 and the communications buses 10 will have to accommodate a bandwidth that is at least twice, and possibly ten times or more, this fundamental frequency bandwidth. The co-simulation interface 8 and the communications buses 10 would be able to operate at a greatly reduced bandwidth if the simulation output signals of the models 6 could convey the same information at baseband or near direct current (DC) levels.
Each simulation 30 comprises a continuous time domain model 6 that represents one or more simulated parameters or subsystems of the complex physical system that the simulation system 30 represents. Each model 6 produces a continuous time domain simulation output signal xac(t) on a model output line 12 that has a significant alternating current (AC) characteristic that occurs at a dominant or fundamental frequency. An output processor 36 receives the simulation output signal xac(t) on the model output line 12. The output processor 36 comprises a synchronous rotating reference frame transform 38, an anti-alias filter 40 and a sampler 42.
The synchronous rotating reference frame transform 38 operates at a selected frequency that corresponds to the dominant or fundamental frequency of the simulation output signal xac(t) to convert it to multiple simulation output signal components that represent the vector of the simulation output signal xac(t). These simulation output signal components may represent Cartesian real and imaginary components, polar magnitude and phase components, or components for any other convenient coordinate system.
In
The anti-alias filter 40 receives the baseband simulation output amplitude signal xdc(t) on a simulation output amplitude line 44, the simulation output phase signal θ(t) on a simulation output phase line 46 and the simulation output frequency signal ω(t) on a simulation output frequency line 48 and removes content of these signals above a maximum desired communication frequency f to produce corresponding filtered simulation output amplitude signal xdcf(t) on an amplitude filter output line 54, filtered simulation output phase signal θf(t) on a phase filter output line 56 and filtered simulation output frequency signal ωf(t) on a frequency filter output line 58.
The sampler 42 receives the filtered simulation output amplitude signal xdcf(t) on an amplitude filter output line 54, filtered simulation output phase signal θf(t) on a phase filter output line 56 and filtered simulation output frequency signal ωf(t) on a frequency filter output line 58 and samples and holds values of the filtered simulation output amplitude signal xdcf(t), the filtered simulation output phase signal θf(t) and the filtered simulation output frequency signal ωf(t) at a selected sampling rate k with a frequency of at least the Nyquist Rate, or 2f to produce a sampled output amplitude signal Xdcf(k) on a sampler output amplitude line 60, a sampled output phase signal Θf(k) on a sampler output phase line 62 and a sampled output frequency signal Ωf(k) on a sampler output frequency line 64.
The co-simulation interface 32 receives sampled output amplitude signal Xdcf(k) on a sampler output amplitude line 60, a sampled output phase signal Θf(k) on a sampler output phase line 62 and a sampled output frequency signal Ωf(k) on a sampler output frequency line 64 and transfers them to another simulation 30 by way of respective communication buses 34. An input signal processor 66 receives sampled output amplitude signal Xdcf(k) on a sampled amplitude line 68, a sampled output phase signal Θf(k) on a sampled phase line 70 and a sampled output frequency signal Ωf(k) on a sampled frequency line 72. The input signal processor 66 comprises an amplitude signal reconstruction filter 74, a stationary reference frame transform 76 and a simulation signal reconstruction filter 78.
The amplitude signal reconstruction filter 74 receives the sampled output amplitude signal Xdcf(k) on the sampled amplitude line 68 and conditions the sampled output amplitude signal Xdcf(k) to produce a conditioned amplitude signal xdcs(t) on a conditioned amplitude signal line 80. The amplitude signal reconstruction filter 74 may be a low-pass filter that filters or smoothes the sampled output amplitude signal Xdcf(k).
The stationary reference frame transform 76 receives the conditioned amplitude signal xdcs(t) on the conditioned amplitude signal line 80, the sampled output phase signal Θf(k) on the sampled phase line 70 and the sampled output frequency signal Ωf(k) on the sampled frequency line 72 and transforms them to a simulation input signal xac(t) on a stationary reference frame transform output line 82. The simulation signal reconstruction filter 78 receives the simulation input signal xac(t) on the stationary reference frame transform output line 82 and conditions it to produce a conditioned simulation input signal Xacs(t) on a conditioned simulation signal input line 84. The simulation signal reconstruction filter 78 may be a low-pass filter that filters or smoothes the simulation input signal xac(t). The model 6 receives the conditioned simulation input signal xacs(t) on the conditioned simulation signal input line 84, thereby letting the models 6 of the simulations 30 to communicate and interact.
If the models 6 generate simulation signals with multiple dominant frequencies, such as a fundamental frequency and several harmonics, each simulation 30 may comprise multiple output processors 36 and input processors 66, each corresponding to a different dominant frequency of interest. In this case, a band-pass filter may filter the simulation output signal xac(t) from each model 6 into frequency component signals at the frequencies of interest and distribute them to corresponding output processors 36. A multiplexer may multiplex the frequency component simulation input signals from the multiple input processors 66 to generate the simulation input signal xac(t).
The described embodiments of the invention are only some illustrative implementations of the invention wherein changes and substitutions of the various parts and arrangement thereof are within the scope of the invention as set forth in the attached claims.