Time / Amplitude in dB graph : how ?

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
chimimic
Expert User
Posts: 508
Joined: Tue 2006-04-11 13:31
Location: France
Contact:

Time / Amplitude in dB graph : how ?

Post by chimimic »

Hello,

perhaps an idiot question, but I can't find how to get an amplitude in dB, relative to time, in an analog graph. I search how to plot amplitude response of an audio envelope/shape generator in a lin and log fashion. Frequency and AC sweep graphs allow to choose linear or dB for Y scale, but others analog graphs don't allow this.

At the moment I use an home made "log convertor" to plot (in dBu) my audio signal amplitude - AD736 and trace with formula 20*log(P1/0.775). This "works" but I think there is a more elegant methode to achieve this.
env_gen_003_001a.gif
env_gen_003_001a.gif (33.27 KiB) Viewed 250 times
Can you help me please ?
Hope I'm enough clear.

Thanks !
Remy
Ettore
Labcenter Staff
Posts: 2936
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Time / Amplitude in dB graph : how ?

Post by Ettore »

Proteus plots standard Spice ANALOG ANALYSIS graphs in the time domain, and unfortunately Spice 3F5 cannot set directly amplitude for log scale. However there are a couple of ways you can do that.

1)
Use a AVCVS primitive (Voltage controlled voltage source) and set it with the formula to compute dB. You find it into the library at Modelling Primitives->Analog(SPICE). log10.pdsprj test shows it.

2)
Use of 'computed traces' in a graph. The log10_1.pdsprj shows how to do. The formula you can add with 'add trace...' are the same used for previous mentioned AVCVS primitive.
Attachments
log10.pdsprj
(254.59 KiB) Downloaded 46 times
log10_1.pdsprj
(246.32 KiB) Downloaded 44 times
Kind regards,
Ettore Arena - Labcenter Electronics.
chimimic
Expert User
Posts: 508
Joined: Tue 2006-04-11 13:31
Location: France
Contact:

Re: Time / Amplitude in dB graph : how ?

Post by chimimic »

Thanks Ettore for this fast answer and your explanation. :D
Use of 'computed traces' in a graph was what I made before asking question, but use of AVCVS primitive is more simpler that my solution.

Remy
Ettore
Labcenter Staff
Posts: 2936
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: Time / Amplitude in dB graph : how ?

Post by Ettore »

Just as a follow up of the matter, please find attached my method to get the envelope from a modulated signal in simulation.
This method is a 'surrogate' of the Hilbert's transform. It uses a different approach instead of a discrete convolution (inverse discrete FFT transform) but it ends up with a similar results: a (quasi) rectangular LP filter that removes carrier plus c+m and c-m components.
This approach is more performant in simulation than the your with AD736.
Attachments
envelope.pdsprj
(297.1 KiB) Downloaded 50 times
Kind regards,
Ettore Arena - Labcenter Electronics.
chimimic
Expert User
Posts: 508
Joined: Tue 2006-04-11 13:31
Location: France
Contact:

Re: Time / Amplitude in dB graph : how ?

Post by chimimic »

Another interresting solution, even if in my case there is no carrier but only pure audio.
Thank you very much Ettore :D
Post Reply