完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们正在尝试使用DSPIC33系列单片机设计1KVA逆变器。为此,我们从Microchip的AN1279应用笔记开始。对于PWM产生,在该应用笔记中使用128值的正弦波表。正弦表文件附在下面。表中的第一个条目是0和gt;我们取了θ=0.128个条目=13695 & gt;对于dSPIC MCU,我们使用θ=90.0,PWM占空比长度=16比特,然后考虑正弦波的移位,如果PWM分辨率为15,则该值的最大值2 ^ 16=655 35一半是327 68。位,然后max值=32767,半值=1638,但在表中,max值=13695i读取有关正弦表计算的相关论坛帖子,计算出的VAUES与表中的VAUE不同。还是我理解错了?谢谢
以上来自于百度翻译 以下为原文 Hi, we are trying to design 1KVA inverter using dsPIC33 family MCU. For this we have started with AN1279 application note by MICROCHIP. For PWM generation, sine wave table with 128 values is used in that application note. sine table file attached below. First entry in the table is 0-> we took that theta=0. 128th entry =13695 -> we took theta=90. for dsPIC mcu, pwm Duty reg length=16bits, then considering shifting of sine wave, the maximum value ~2^16=65535 Half of this value is 32768 if pwm resolution is taken as 15bits, then max value=32767, half value=16384 But in the table, max value=13695 I read related forum posts about sine table calculations, the calculated vaues are different from those in the table. did they take some lower value intentionally, due to some reason. or am i wrong in understanding it. Thanks Attachment(s) sineTab50Hz.txt (1.54 KB) - downloaded 50 times |
|
相关推荐
9个回答
|
|
事实上,他们似乎想要“修剪”最大值一点点。
以上来自于百度翻译 以下为原文 indeed it looks like they wanted to "trim" the max value a little bit. |
|
|
|
嗨,DarioG,谢谢分享信息。我们如何决定修剪价值?谢谢
以上来自于百度翻译 以下为原文 Hi DarioG, Thanks for sharing the info. How do we decide that trimming value? Thanks |
|
|
|
哦,我没有线索,如果你使用的是一个完全由别人提供的原理图和代码(Microchip或任何人),坚持这些价值。如果你正在设计你自己的东西,重新计算表的满刻度-我通常使用16位,并在运行时(如果右移,相当快),按比例缩小它们。
以上来自于百度翻译 以下为原文 Oh well, I've got no clue If you're using a schematic and code fully provided by someone else (microchip or whoever), stick to those value. If you're designing your own thing, recalculate the table for full scale - I usually use 16bits and scale them down if needed at run time (right shift, quite fast) |
|
|
|
准备完整的表格,根据需要动态缩放。这是个好主意。谢谢。
以上来自于百度翻译 以下为原文 prepare full table, scale it dynamically as needed. It is a good idea. Thank you |
|
|
|
你只需要正弦角0 - 89或1 - 90。使用一个角度为1到90的SPRIDER表,转换成弧度,然后计算Q1.5值。然后可以计算所有的4个(正弦,COS)象限。程序只需要乘法。
以上来自于百度翻译 以下为原文 You only need the sin angles 0 - 89 or 1 - 90. Use a spreedsheet with angles 1 - 90, convert to radians then caluculate Q1.5 value. All 4 (sin, cos) quadrants can then be calculated. The program only needs to do multiply |
|
|
|
这是我创建的Sn/COS表。我用它来画椭圆、圆圈、圆弧、扇形和线段。对于更精确的值,四边形表为0.25步;---------------------------截面SnCONDATA,代码;常量;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Word 662.Word 6122.Word 692.Word 7927.Word 8481;15字9058.字10126字10668字11207;20.Word 11743.Word 12805.Word 1332×Word 13848;25.Word 14365.Word 1586Word1584.Word 15888 Word 16384;30.Word 1687.Word 17364.Word 17847.WORD18324.Word 1976.单词20622.Word 20622.Word 21996单词223 48单词227 63.3字23170;42.527.56Word 24965.Word 24730.Word 25102;单词25466单词25822.Word 26170.Word 26510 Word 26842;52.Word 26166单词2648 2.Word 7789字28Word 28378;60.28字;61972;单词29 92.单词29 92.单词29 935.Word 30163.Word 3052.2字30592.Word 30792;70.30字9163单词31636单词31499单词31651;单词31795.Word 31928单词3552.Word 32 166单词32270;83Word 323 65.Word 32449单词32524.Word 32588。Word 32643;85.Word 32688 Word 327 23.Word 327 48字32763;89SnCo
以上来自于百度翻译 以下为原文 Here is the sin/cos table that I created. I use it to draw ellipses, circles, arcs, sectors and segments. For more accurate values quadrupal the table into steps of 0.25 ;---------------------------------------------------- .section sincosdata,code ;constants ;---------------------------------------------------- sincostable: .word 0 ;0 .word 572 .word 1144 .word 1715 .word 2286 .word 2856 ;5 .word 3425 .word 3993 .word 4560 .word 5126 .word 5690 ;10 .word 6252 .word 6813 .word 7371 .word 7927 .word 8481 ;15 .word 9032 .word 9580 .word 10126 .word 10668 .word 11207 ;20 .word 11743 .word 12275 .word 12803 .word 13328 .word 13848 ;25 .word 14365 .word 14876 .word 15384 .word 15886 .word 16384 ;30 .word 16877 .word 17364 .word 17847 .word 18324 .word 18795 ;35 .word 19261 .word 19720 .word 20174 .word 20622 .word 21063 ;40 .word 21498 .word 21926 .word 22348 .word 22763 .word 23170 ;45 .word 23571 .word 23965 .word 24351 .word 24730 .word 25102 ;50 .word 25466 .word 25822 .word 26170 .word 26510 .word 26842 ;55 .word 27166 .word 27482 .word 27789 .word 28088 .word 28378 ;60 .word 28660 .word 28932 .word 29197 .word 29452 .word 29698 ;65 .word 29935 .word 30163 .word 30382 .word 30592 .word 30792 ;70 .word 30983 .word 31164 .word 31336 .word 31499 .word 31651 ;75 .word 31795 .word 31928 .word 32052 .word 32166 .word 32270 ;80 .word 32365 .word 32449 .word 32524 .word 32588 .word 32643 ;85 .word 32688 .word 32723 .word 32748 .word 32763 ;89 sincostable_end: ;---------------------------------------------------- |
|
|
|
啊,的确,有128个步骤不是那么有用——90个通常是足够的:
以上来自于百度翻译 以下为原文 ah yep, indeed having 128 steps is not so useful - 90 are usually enough :) |
|
|
|
最大值将取决于计时器周期,而不是寄存器的大小。细节取决于您使用的特定OC或PWM模块。
以上来自于百度翻译 以下为原文 The maximum value would depend on the timer period, not on the size of the register. The details depend on the specific OC or PWM module you use. |
|
|
|
嗨,表1中附件中的表似乎适合于14位分辨率的PWM,并且将占空比限制在大约83%编辑,上面的消息:或13或696或13750的PWM周期计数器。针对PWM周期频率为16千赫兹,这仍然需要一个220μm的PWM时钟信号。取决于逆变器功率级中的电路和元件,驱动开关到100%占空比可能是不可取的。取决于使用什么类型的FET或IGBT驱动器,关断时间可能比接通时间长。这可能会增加开关晶体管的有效占空比,f。一些功率FET驱动器使用电荷泵和电容器为N沟道功率开关的高侧栅极驱动提供功率。如果电容器小,则当高侧开关接通时,不应该有太长的时间而没有PWM脉冲。我同意机智。h建议使用电子表格,计算自己的表。如果你为一个固定的输出频率制作一个逆变器,并且定义了一个PWM频率,那么就有可能为这个目的定义一个调制表。例如:PWM基频16 kHz和逆变器输出频率50赫兹:在输出波形的每一个季度中,16000/50/4=80个PWM脉冲。可以直接使用80个条目的正弦表,或者另一种方式,对于50 Hz的固定频率输出,以及具有128个条目的调制表,可以使用25600 Hz的PWM基频与直接表查找,而不在时间和相位角内进行插值,但是对于全16位PWM分辨率,这意味着一个可变频率驱动的PWM时钟频率为1.677 GHz,这是不同的,然后需要时间和相位角的闪烁。一个具有128个条目的调制表仍然是有意义的,它可以通过避免除法来更有效地缩放时间,而不是使用乘法。你可以根据时钟频率选择PWM分辨率,需要PWM周期。然后,为了确定调制表可能需要什么“修整”,你需要对实际硬件进行测量,包括卸载和满负荷。迈西尔
以上来自于百度翻译 以下为原文 Hi, Table in attachment in message #1 seem to be tailored to PWM with 14 bit resolution. and limit the duty cycle to about 83 % Edit, message above: Or a PWM period counter of 13 696 or higher, maybe 13750. Aiming for a PWM period frequency of 16 kHz, this will still require a PWM clock signal of 220 MHz. Depending on circuits and components in inverter power stages, driving switches to 100 % duty cycle may not be desirable. Depending on what kind of FET or IGBT drivers are used, switch off time may be longer than switch on time. This may increase the effective duty cycle of switching transistors, from values listed in the table. Also some types of power FET drivers use a charge pump and a capacitor to provide power to the High side gate drive for N-channel power switches. If the capacitor is small, there should not be too long time without PWM pulses when the High-side switch is on. I agree with the suggestion above to use a spreadsheet, and calculate your own table. If you are making a inverter for a fixed output frequency, and have defined a PWM frequency, it may be possible to define a modulation table for the purpose. E.g.: PWM base frequency 16 kHz and inverter output frequency 50 Hz: 16000 / 50 / 4 = 80 PWM pulses in each quarter of the output waveform. a sine table with 80 entries may be used directly. or the other way around, for 50 Hz fixed frequency output, and modulation table with 128 entries, a PWM base frequency of 25600 Hz may be used with direct table lookup, without interpolation in time and phase angle. But for full 16 bit PWM resolution, this would imply a PWM clock frequency of 1.677 GHz For a variable frequency drive, it is different, then scalling in time and phase angle is needed. A modulation table with 128 entries still make sense, it may make scaling in time more efficient by avoiding division, and instead using multiplication and shift in time scaling expression. You select PWM resolution according to what clock frequency is available, and what PWM period is wanted. Then to determine what 'trim' the modulation table may need, you will need to make measurements on the actual hardware, both unloaded and with full load. Mysil |
|
|
|
只有小组成员才能发言,加入小组>>
5202 浏览 9 评论
2016 浏览 8 评论
1942 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3188 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2243 浏览 5 评论
753浏览 1评论
640浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
545浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
652浏览 0评论
552浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-4 16:43 , Processed in 1.829860 second(s), Total 93, Slave 76 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号