Physical system modelling

Discussions about active development projects
User avatar
DashPi
Posts: 13
Joined: Tue Jun 10, 2014 8:16 pm

Physical system modelling

Post by DashPi » Mon Jun 30, 2014 7:29 pm

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?

User avatar
DashPi
Posts: 13
Joined: Tue Jun 10, 2014 8:16 pm

Re: Physical system modelling

Post by DashPi » Mon Jun 30, 2014 7:44 pm

Here is how the app. looks like:
Image

User avatar
DashPi
Posts: 13
Joined: Tue Jun 10, 2014 8:16 pm

Re: Physical system modelling

Post by DashPi » Tue Jul 01, 2014 10:56 am

Here's the example of the harmonic oscillator modelling and step response:


Image

Crt Valentincic
Posts: 67
Joined: Wed May 28, 2014 12:15 pm

Re: Physical system modelling

Post by Crt Valentincic » Wed Jul 02, 2014 4:32 pm

Nice work!

fisafisa
Posts: 29
Joined: Fri Jun 06, 2014 6:02 pm

Re: Physical system modelling

Post by fisafisa » Wed Jul 16, 2014 10:36 pm

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!

User avatar
DashPi
Posts: 13
Joined: Tue Jun 10, 2014 8:16 pm

Re: Physical system modelling

Post by DashPi » Thu Jul 17, 2014 5:13 pm

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.

bingoiceono
Posts: 5
Joined: Thu Jun 19, 2014 9:21 am

Re: Physical system modelling

Post by bingoiceono » Wed Jul 23, 2014 9:22 am

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

Rudolf
Posts: 1
Joined: Wed Jul 23, 2014 8:14 pm

Re: Physical system modelling

Post by Rudolf » Wed Jul 23, 2014 8:26 pm

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
Posts: 5
Joined: Thu Jun 19, 2014 9:21 am

Re: Physical system modelling

Post by bingoiceono » Mon Jul 28, 2014 3:26 am

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.

User avatar
DashPi
Posts: 13
Joined: Tue Jun 10, 2014 8:16 pm

Re: Physical system modelling

Post by DashPi » Thu Jul 31, 2014 2:36 pm

bingoiceono, have you checked impedance settings of oscilloscope inputs and signal generator (50 ohm / HIZ)? Sometimes wrong impedance selection may produce voltage drops.

Post Reply
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: Google [Bot] and 0 guests