From: Chris on 27 Jul 2010 01:23 Hi, I'm trying to generate a PWM signal with a duty cycle that increases with time. I'm using the Simscape Controlled PWM Voltage block. Is it possible to have a block parameter vary with time? Or is there a different block that might accomplish the same goal? Thanks, Chris
From: Jean Baptiste Lanfrey on 27 Jul 2010 04:46 Hi Chris, Depending on the version you are using there are several ways to do it. You can use built-in blocks (physical signals from simscape foundation library) and for instance compare a triangle carrier with an input signal that will determine the duty cycle. You can also use the simscape language to build you own PWM generator with either a time varying duty cycle defined in the ssc file (http://www.mathworks.com/access/helpdesk/help/toolbox/physmod/simscape/ref/time.html) or as an input to your block. HTH Jean-Baptiste "Chris " <christopher.woodruff(a)samsung.com> a �crit dans le message de news: i2lqfo$doc$1(a)fred.mathworks.com... > Hi, > I'm trying to generate a PWM signal with a duty cycle that increases with > time. I'm using the Simscape Controlled PWM Voltage block. Is it possible > to have a block parameter vary with time? Or is there a different block > that might accomplish the same goal? > Thanks, > Chris >
From: Chris on 28 Jul 2010 01:15 Hi Jean-Baptiste, Thanks for your reply. So far, I've been trying to generate the signal using built-in blocks (I'm not familiar enough with Simulink/PWM to try to build the generator myself). I'm a bit confused by the other method you suggest. I want the duty cycle to increase 10% every .1 seconds, so I created this signal using a ramp and rounding function. Can I input this as a parameter for another block? I don't really understand what you mean by "compare a triangle carrier with an input signal." Sorry for my simulink incompetence.... Thanks again! "Jean Baptiste Lanfrey" <jlanfrey(a)mathworks.com> wrote in message <i2m6d7$4ie$1(a)fred.mathworks.com>... > Hi Chris, > Depending on the version you are using there are several ways to do it. > You can use built-in blocks (physical signals from simscape foundation > library) and for instance compare a triangle carrier with an input signal > that will determine the duty cycle. > You can also use the simscape language to build you own PWM generator with > either a time varying duty cycle defined in the ssc file > (http://www.mathworks.com/access/helpdesk/help/toolbox/physmod/simscape/ref/time.html) > or as an input to your block. > HTH > Jean-Baptiste > > > "Chris " <christopher.woodruff(a)samsung.com> a crit dans le message de news: > i2lqfo$doc$1(a)fred.mathworks.com... > > Hi, > > I'm trying to generate a PWM signal with a duty cycle that increases with > > time. I'm using the Simscape Controlled PWM Voltage block. Is it possible > > to have a block parameter vary with time? Or is there a different block > > that might accomplish the same goal? > > Thanks, > > Chris > > >
From: Jean Baptiste Lanfrey on 28 Jul 2010 03:47 Hi Chris, you can definetly do it and it is not that complicated. The method I was proposing is a simple one that is using a few built-in blocks (a triangle source, a comparator and a duty cycle input). Have a look there : http://en.wikipedia.org/wiki/Pulse-width_modulation. It explains the simplest method to generate a PWM. Once you've built this simple model, just connect a ramp (slope 10%/0.1s) to the duty cycle input and you're done. Jean-Baptiste "Chris " <christopher.woodruff(a)samsung.com> a �crit dans le message de news: i2oedf$coc$1(a)fred.mathworks.com... > Hi Jean-Baptiste, > > Thanks for your reply. So far, I've been trying to generate the signal > using built-in blocks (I'm not familiar enough with Simulink/PWM to try to > build the generator myself). I'm a bit confused by the other method you > suggest. I want the duty cycle to increase 10% every .1 seconds, so I > created this signal using a ramp and rounding function. Can I input this > as a parameter for another block? I don't really understand what you mean > by "compare a triangle carrier with an input signal." Sorry for my > simulink incompetence.... > > Thanks again! > > > "Jean Baptiste Lanfrey" <jlanfrey(a)mathworks.com> wrote in message > <i2m6d7$4ie$1(a)fred.mathworks.com>... >> Hi Chris, >> Depending on the version you are using there are several ways to do it. >> You can use built-in blocks (physical signals from simscape foundation >> library) and for instance compare a triangle carrier with an input signal >> that will determine the duty cycle. >> You can also use the simscape language to build you own PWM generator >> with either a time varying duty cycle defined in the ssc file >> (http://www.mathworks.com/access/helpdesk/help/toolbox/physmod/simscape/ref/time.html) >> or as an input to your block. >> HTH >> Jean-Baptiste >> >> >> "Chris " <christopher.woodruff(a)samsung.com> a crit dans le message de >> news: i2lqfo$doc$1(a)fred.mathworks.com... >> > Hi, >> > I'm trying to generate a PWM signal with a duty cycle that increases >> > with time. I'm using the Simscape Controlled PWM Voltage block. Is it >> > possible to have a block parameter vary with time? Or is there a >> > different block that might accomplish the same goal? >> > Thanks, >> > Chris >> > >>
From: Chris on 29 Jul 2010 00:45 Yeah, I got it to work thanks. I actually had that wikipedia page bookmarked from about a month ago but didn't realize that it could be so helpful. Thanks again for your help! "Jean Baptiste Lanfrey" <jlanfrey(a)mathworks.com> wrote in message <i2onac$4f8$1(a)fred.mathworks.com>... > Hi Chris, > you can definetly do it and it is not that complicated. > The method I was proposing is a simple one that is using a few built-in > blocks (a triangle source, a comparator and a duty cycle input). > > Have a look there : http://en.wikipedia.org/wiki/Pulse-width_modulation. It > explains the simplest method to generate a PWM. > > Once you've built this simple model, just connect a ramp (slope 10%/0.1s) to > the duty cycle input and you're done. > > Jean-Baptiste
|
Pages: 1 Prev: Fuzzy logic toolbox - Fuzzy controler Next: substitude for "length" |