Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
PSpice Gain/phase model for S/H and quantization in software loop (digital SMPS)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Klaus Kragelund  
View profile  
 More options Nov 15 2012, 5:14 pm
Newsgroups: sci.electronics.design
From: Klaus Kragelund <klausk...@hotmail.com>
Date: Thu, 15 Nov 2012 14:14:07 -0800 (PST)
Local: Thurs, Nov 15 2012 5:14 pm
Subject: PSpice Gain/phase model for S/H and quantization in software loop (digital SMPS)
Hi

I have implemented a digital SMPS in a Cortex M3 controller. The feedback of the SMPS is done using the TL431 and opto coupler feedback.

The feedback is sampled by the ADC at 10kSa and the sampled values controls the duty-cycle of the SMPS.

It is stable, but I would like to simulate the loop in PSPice. The ADC has sample and hold along with quantiziation that affects the gain/phase. The timer generating the PWM has finite number of different dutycycles and that has a small scale effect also.

I would like to have a model both for transient and ac sweeps.

The ac sweep can be modelled by a sinc function, but how to model the quantization and PWM stage (discrete duty cycles)?

Also, for the transient simulation, the ADC can be modelled simple by a S/H. The quantization can be modelled by a floor function, and for the PWM I need another floor function and a couple of ABMs to model the PWM. But, is there a better method for this?

Thanks

Klaus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Wescott  
View profile  
 More options Nov 15 2012, 5:44 pm
Newsgroups: sci.electronics.design
From: Tim Wescott <t...@seemywebsite.com>
Date: Thu, 15 Nov 2012 16:44:44 -0600
Local: Thurs, Nov 15 2012 5:44 pm
Subject: Re: PSpice Gain/phase model for S/H and quantization in software loop (digital SMPS)

I think you're taking the right approach for the sample & hold and
quantization in the transient simulation.

You're almost right with the sampling in the frequency domain -- you're
not taking aliasing into account, but as long as your output filter
doesn't have appreciable gain above Nyquist then you're all set there.

Traditionally, the way to account for the quantization in the frequency
domain is to model it as noise injection.  This makes sense if you think
about it right: the output of a quantization step is your desired signal
plus an error, so you just call that error "noise" and do some analysis.

You would like to be able to model it as being random, which would make
it white in the sampled-time domain, and roughly white but perfectly band-
limited to the sampling rate in the continuous-time domain.  In reality,
this only happens if you have enough other noise in the circuit to keep
the quantization agitated -- the more pessimistic approach is to model
the quantization noise as being a sine wave that is 1.09 a quantization
step peak to peak (to account for the fact that it's a square wave), and
at the worst possible frequency.  This accounts for the fact that -- if
all else is quiet -- your circuit will oscillate around a quantization
step.

Regardless of whether you assume random or worst-case noise, the way to
analyze it is to treat the quantization gain as a signal that's injected
at the quantizer, do a sweep to find the transfer function from there to
your output, then plug in one of the above two assumptions and see what
the noise is on your output.

Shameless plug: this method of treating quantization is covered briefly
in my book "Applied Control Theory for Embedded Systems".  You'll find it
mentioned briefly in chapter 8 (Nonlinear Systems), and in depth in
chapter 10 (Software Implications).

http://www.wescottdesign.com/actfes/actfes.html

If you find that your PWM is too coarse to give good quantization
behavior, you may also find this article to be of benefit:
http://www.embedded.com/design/configurable-systems/4006431/Sigma-delta-
techniques-extend-DAC-resolution

or http://tinyurl.com/9dr5y5p, if you are long-URL challenged.

Note that you need to pay attention to the output filter bandwidth, and
that going to a 2nd-order sigma-delta modulator may be beneficial if you
can stand the code complexity.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?

Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Klaus Kragelund  
View profile  
 More options Nov 15 2012, 7:53 pm
Newsgroups: sci.electronics.design
From: Klaus Kragelund <klausk...@hotmail.com>
Date: Thu, 15 Nov 2012 16:53:14 -0800 (PST)
Local: Thurs, Nov 15 2012 7:53 pm
Subject: Re: PSpice Gain/phase model for S/H and quantization in software loop (digital SMPS)

Yes, that makes sense. Thats what I'm seeing on the scope, it really can never as opposed to an analog controller regulate to the exact target value.

Good insights, thanks :-)

I just may need to buy that book ;-)

> If you find that your PWM is too coarse to give good quantization

> behavior, you may also find this article to be of benefit:

> http://www.embedded.com/design/configurable-systems/4006431/Sigma-delta-

> techniques-extend-DAC-resolution

My code supports sigma delta, but have not tried it yet, since I want to remove that from the closed loop analysis

Regards

Klaus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark  
View profile  
 More options Nov 15 2012, 7:54 pm
Newsgroups: sci.electronics.design
From: Mark <makol...@yahoo.com>
Date: Thu, 15 Nov 2012 16:54:28 -0800 (PST)
Local: Thurs, Nov 15 2012 7:54 pm
Subject: Re: PSpice Gain/phase model for S/H and quantization in software loop (digital SMPS)

> > I have implemented a digital SMPS in a Cortex M3 controller. The
> > feedback of the SMPS is done using the TL431 and opto coupler feedback.

> > The feedback is sampled by the ADC at 10kSa and the sampled values
> > controls the duty-cycle of the SMPS.

> > It is stable, but I would like to simulate the loop in PSPice. The ADC
> > has sample and hold along with quantiziation that affects the
> > gain/phase.

you can approximate the phase (time delay) using a pspice transmission
line with a delay of 1/2 the sampling period

Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vladimir Vassilevsky  
View profile  
 More options Nov 16 2012, 10:01 am
Newsgroups: sci.electronics.design
From: "Vladimir Vassilevsky" <nos...@nowhere.com>
Date: Fri, 16 Nov 2012 09:01:48 -0600
Local: Fri, Nov 16 2012 10:01 am
Subject: Re: PSpice Gain/phase model for S/H and quantization in software loop (digital SMPS)

"Klaus Kragelund" <klausk...@hotmail.com> wrote in message

news:8e588d8c-d9ec-4794-96d7-751116072a72@googlegroups.com...

The sampling delay in the band of interest could be approximated by allpass
filter section. PWM is done with sawtooth waveform and comparator.
Quantization error could be modelled by adding noise; however that won't
tell about possible limit cycles.

VLV


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »