Physical system modelling
- DashPi
- Posts: 13
- Joined: Tue Jun 10, 2014 8:16 pm
Physical system modelling
I recently developed a new app. (LTI) for physical system modeling from a set of coefficients. I'm already working on some variants with embedded system design tools and have in mind porting it to FPGA. Any suggestions regarding the FPGA implementation?
- DashPi
- Posts: 13
- Joined: Tue Jun 10, 2014 8:16 pm
Re: Physical system modelling
Here is how the app. looks like:
- DashPi
- Posts: 13
- Joined: Tue Jun 10, 2014 8:16 pm
Re: Physical system modelling
Here's the example of the harmonic oscillator modelling and step response:
-
- Posts: 67
- Joined: Wed May 28, 2014 12:15 pm
Re: Physical system modelling
Nice work!
-
- Posts: 29
- Joined: Fri Jun 06, 2014 6:02 pm
Re: Physical system modelling
What about a state space model?
X(t+1) = A X(t) + B U(t)
Y(t+1) = C X(t) + D U(t)
U and Y are 2 value vectors
X is n values (let's say 20)
A is square matrix describing system dynamics
B and D are 2 * 20 matrices
C is 20 * 2 matrices
With this model you can describe any (limited to X size dynamic order) 2x2 linear system
Nice work!
X(t+1) = A X(t) + B U(t)
Y(t+1) = C X(t) + D U(t)
U and Y are 2 value vectors
X is n values (let's say 20)
A is square matrix describing system dynamics
B and D are 2 * 20 matrices
C is 20 * 2 matrices
With this model you can describe any (limited to X size dynamic order) 2x2 linear system
Nice work!
- DashPi
- Posts: 13
- Joined: Tue Jun 10, 2014 8:16 pm
Re: Physical system modelling
Thanks Črt and fisafisa.
The state space is certainly an option. Any DSP code can be simply added to the file
https://github.com/dashpi/RedPitaya/blo ... fpga_lti.c
from line 367 on and compiled.
Arrays cha_state, chb_state or other arrays can be used to register the state X, while the arrays
cha_dsp_par, chb_dsp_par can be used to pass the system parameters ABCD.
In SS you can even extend the app. to a 2x2 MIMO by using both inputs and outputs.
I think with SS is more convenient to pass the matrixes through files.
The state space is certainly an option. Any DSP code can be simply added to the file
https://github.com/dashpi/RedPitaya/blo ... fpga_lti.c
from line 367 on and compiled.
Arrays cha_state, chb_state or other arrays can be used to register the state X, while the arrays
cha_dsp_par, chb_dsp_par can be used to pass the system parameters ABCD.
In SS you can even extend the app. to a 2x2 MIMO by using both inputs and outputs.
I think with SS is more convenient to pass the matrixes through files.
-
- Posts: 5
- Joined: Thu Jun 19, 2014 9:21 am
Re: Physical system modelling
This is a great app.
I have one question. When I set a0 and b0 to 1 and others be 0. Is there must be some gain on the signal? The output I got is about 2 times than the input
I have one question. When I set a0 and b0 to 1 and others be 0. Is there must be some gain on the signal? The output I got is about 2 times than the input
-
- Posts: 1
- Joined: Wed Jul 23, 2014 8:14 pm
Re: Physical system modelling
Great app!
@bingoiceono: On my Redpitaya it works fine even with your filter settings. The signals have equal amplitudes. I'm using one of the Redpitaya outputs to generate the input signal + "generate" command. How are you feeding your Redpitaya input?
@bingoiceono: On my Redpitaya it works fine even with your filter settings. The signals have equal amplitudes. I'm using one of the Redpitaya outputs to generate the input signal + "generate" command. How are you feeding your Redpitaya input?
-
- Posts: 5
- Joined: Thu Jun 19, 2014 9:21 am
Re: Physical system modelling
I use an external signal generator and oscilloscope to test it. Signal generator outputs signal to the RP's input port and the oscilloscope. The programmed RP signal is also connected to the same oscilloscope.
- DashPi
- Posts: 13
- Joined: Tue Jun 10, 2014 8:16 pm
Re: Physical system modelling
bingoiceono, have you checked impedance settings of oscilloscope inputs and signal generator (50 ohm / HIZ)? Sometimes wrong impedance selection may produce voltage drops.
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 2 guests