[Scilab-users] Xcos Loudspeaker simulation Algebraic loop and Bode plot

classic Classic list List threaded Threaded
12 messages Options
Florent Florent
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Xcos Loudspeaker simulation Algebraic loop and Bode plot

This post was updated on .
Good morning,

I'm attempting to make a Xcos version of a Simulink model of a loudspeaker
that I found on Daniel San Ausín's Thesis (page 8). Please see the attached file for the signal flow chart.



It's "quite simple", just additions and multiplications.
The parameters Le, Re, Bl, Mms, Rms, Cms are the Thiele & Small parameters of a
loudspeaker (it's just floating values).
The input voltage can be a sinus, a noise or whatever.

I'm getting a message error "Algebraic loop".
Do you know how to solve that ? I think it can be a problem in the
simulation setup as I'm new to Scilab/Xcos.

Here is the Xcos diagram: linear_LS.zcos

I'm also trying to display the Bode plot at different stages of the diagram
that's why I'm using the CPGE toolbox.

If you have an idea to solve the problem, feel free to contact me.
You can answer in French.

 I'll also try a different approach with the state-space bloc.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Florent

I'm interested in the loudspeaker rmodel (I work in the loudspeaker industry). The Master Thesis you're referencing to, it uses Matlab. Did you get hold of the Matlab files? ... Are you simply taking some inspiration from this Thesis and experimenting with XCOS?

I tried to download your zcos file, but it came as a ZIP file. When extracted it contains a few files, but no ZCOS file. Appologies if I'm a lost cause here, since I have no experience with XCOS, even basic stuff might throw me off. Please explain.

Best regards,
Claus


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Florent Florent
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Claus,

No, unfortunately I didn't get the Simulink files. And we don't have
Simulink where I'm working.

Here is the zcos file  linear_LS.zcos
<http://mailinglists.scilab.org/file/t497760/linear_LS.zcos>  .

I'm new to Xcos too, I started last week.

Best regards,
Florent



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Florian

I see it's a zcos file, but GMAIL downloads it as a zip file. I just rename it from zip to zcos, and it loads into Scilab. I'll look at it tomorrow. :-)

Best regards,
Claus


On Tue, Mar 6, 2018 at 8:36 PM, Florent <[hidden email]> wrote:
Hi Claus,

No, unfortunately I didn't get the Simulink files. And we don't have
Simulink where I'm working.

Here is the zcos file  linear_LS.zcos
<http://mailinglists.scilab.org/file/t497760/linear_LS.zcos>  .

I'm new to Xcos too, I started last week.

Best regards,
Florent


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

In reply to this post by Florent
Hi Team Scilab

I wish I could buy this book in English:

/Claus

I'm new to Xcos too, I started last week.

Best regards,
Florent


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

In reply to this post by Claus Futtrup
Hi Florian

I loaded the zcos file this morning and compared it to Fig. 2.5 in the Master Thesis. It looks like your Re-box is connected before the integrator, which means it becomes omega-dependent. This is not what we normally do. Did you intend it to be this way? I'm not sure this is actually your problem - I'm just trying to help - and clear the path.

Best regards,
Claus

On Tue, Mar 6, 2018 at 8:40 PM, Claus Futtrup <[hidden email]> wrote:
Hi Florian

I see it's a zcos file, but GMAIL downloads it as a zip file. I just rename it from zip to zcos, and it loads into Scilab. I'll look at it tomorrow. :-)

Best regards,
Claus


On Tue, Mar 6, 2018 at 8:36 PM, Florent <[hidden email]> wrote:
Hi Claus,

No, unfortunately I didn't get the Simulink files. And we don't have
Simulink where I'm working.

Here is the zcos file  linear_LS.zcos
<http://mailinglists.scilab.org/file/t497760/linear_LS.zcos>  .

I'm new to Xcos too, I started last week.

Best regards,
Florent



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Florent Florent
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Claus,

I multiplied i(t) by Re in order to match with the equation:
<http://mailinglists.scilab.org/file/t497760/didt.png>
Or in an other form:
<http://mailinglists.scilab.org/file/t497760/u.png>

What do you mean be omega-dependent?
Is it because in the integration 1/s, s=jw?

Best regards,
Florent



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Florian

Yes, because of the integration. I'm comparing to the source (the thesis), Fig. 2.5.

Best regards,
Claus

On Wed, Mar 7, 2018 at 5:56 PM, Florent <[hidden email]> wrote:
Hi Claus,

I multiplied i(t) by Re in order to match with the equation:
<http://mailinglists.scilab.org/file/t497760/didt.png>
Or in an other form:
<http://mailinglists.scilab.org/file/t497760/u.png>

What do you mean be omega-dependent?
Is it because in the integration 1/s, s=jw?

Best regards,
Florent



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Florent Florent
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hoo, you're right I did a "copy/paste" mistake...
Thanks for notice that.

Now I don't get the Algebraic loop error anymore but i cannot display the
Bode plot, I need to work on it.

Best regards,
Florent



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Florent Florent
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

This post was updated on .
In reply to this post by Florent
Good morning,

Here is an update of my "problem".

First of all I had a problem of compatibility between Scilab/Xcos and the
toolbox CPGE.

Before I was using Scilab 6.0.1 and CPGE Version: 1.6.0.
Now, with Scilab 5.4.1 and CPGE Version: 1.5.2, the Bode plot works. But it
doesn't give the result expected...

For the Displacement vs Frequency, a Low Pass behavior is expected.
For the Velocity vs Frequency, a Band Pass behavior is expected.
For the Acceleration vs Frequency, a High Pass behavior is expected (similar
to the pressure response).

And here is what is get:



And the file linear_LS_working.zcos

--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Florent

Thank you for sharing your experiences with us. I don't speak but maybe 100 words in French and can't string together a sentence (but maybe the most elementary tourist-french). I looked up the CPGE in Atoms, but it looks French to me... https://atoms.scilab.org/toolboxes/CPGE/1.6.3/

You give the result but no details to replicate, etc. I'm afraid I can't help.

Best regards,
Claus


On Fri, Mar 9, 2018 at 10:29 PM, Florent <[hidden email]> wrote:
Good morning,

Here is an update of my "problem".

First of all I had a problem of compatibility between Scilab/Xcos and the
toolbox CPGE.

Before I was using Scilab 6.0.1 and CPGE Version: 1.6.0.
Now, with Scilab 5.4.1 and CPGE Version: 1.5.2, the Bode plot works. But it
doesn't give the result expected...

For the Displacement vs Frequency, a Low Pass behavior is expected.
For the Velocity vs Frequency, a Band Pass behavior is expected.
For the Acceleration vs Frequency, a High Pass behavior is expected (similar
to the pressure response).

And here is what is get:

<http://mailinglists.scilab.org/file/t497760/bode_out.png>


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|

Re: Xcos Loudspeaker simulation Algebraic loop and Bode plot

Hi Florent (CC Scilab Users)

I cannot run the zcos model with my current Scilab 6.0.1 setup (and I haven't installed CPGE 1.6.3 either - is there a way you could simulate a loudspeaker without the need for CPGE??).

The bode plots you get is a function of the input + the loudspeaker model. We know that in principle the accelaration is equivalent to Loudspeaker Sound Pressure Level (SPL) response and it should show a flat area + roll off at both ends. I see that your plots don't do this.

The velocity is like an integration and should "shift" (or "tilt") the response by 6 dB.

The position is also like an integration and should further shift/tilt the reponse additionally 6 dB so that in the bandpass you get a 12 dB/octave slope.

Your current loudspeaker model looks OK (I haven't dug into the details of each block), so my guess is - the output depends on the input. Now that you presumably have a working loudspeaker model - would it then maybe make sense to generate a very simple model - e.g. just a resistor (i.e. not a bandpass - but something that behaves from DC to lightning as a flat curve) - play around with the input and get it to behave correctly?

Best regards,
Claus

On Sat, Mar 10, 2018 at 9:51 AM, Claus Futtrup <[hidden email]> wrote:
Hi Florent

Thank you for sharing your experiences with us. I don't speak but maybe 100 words in French and can't string together a sentence (but maybe the most elementary tourist-french). I looked up the CPGE in Atoms, but it looks French to me... https://atoms.scilab.org/toolboxes/CPGE/1.6.3/

You give the result but no details to replicate, etc. I'm afraid I can't help.

Best regards,
Claus


On Fri, Mar 9, 2018 at 10:29 PM, Florent <[hidden email]> wrote:
Good morning,

Here is an update of my "problem".

First of all I had a problem of compatibility between Scilab/Xcos and the
toolbox CPGE.

Before I was using Scilab 6.0.1 and CPGE Version: 1.6.0.
Now, with Scilab 5.4.1 and CPGE Version: 1.5.2, the Bode plot works. But it
doesn't give the result expected...

For the Displacement vs Frequency, a Low Pass behavior is expected.
For the Velocity vs Frequency, a Band Pass behavior is expected.
For the Acceleration vs Frequency, a High Pass behavior is expected (similar
to the pressure response).

And here is what is get:

<http://mailinglists.scilab.org/file/t497760/bode_out.png>



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users