【ADI•世健工业嘉年华】四、对运动控制和模拟反馈部分寄存器进行解读
本帖最后由 皓月光兮非自明 于 2024-4-2 15:41 编辑<p><strong><span style="font-size:20px;">四、对运动控制和模拟反馈部分寄存器进行解读</span></strong></p>
<table style="border-collapse:collapse; border:none;Times New Roman"">
<tbody>
<tr>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>寄存器</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>绑定功能</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>位</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>描述</b></p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x1B</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">N_POLE_PAIRS</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">电机极对数</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">MOTOR_TYPE</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(23:16)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>电机类型</b></p>
<p align="justify">0: (空)</p>
<p align="justify">1: 单相直流电机</p>
<p align="justify">2: 两相步进电机</p>
<p align="justify">3: 三相BLDC/PMSM</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x18</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">PWM_MAXCNT</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u12(11:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>PWM输出频率:</b></p>
<p align="justify">PWM=100兆赫/(PWM_MAXCNT+1)</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x19</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">PWM_BBM_L</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">用于控制低边MOS-FET栅极的死区时间tBBM_L</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">PWM_BBM_H</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(15:8)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">用于控制高边MOS-FET栅极的死区时间tBBM_H</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x1A</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">PWM_CHOP</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>PWM斩波模式</b></p>
<p align="justify">0: 斩波模式off, 自由运行</p>
<p align="justify">1: 斩波模式off, 低边持续导通</p>
<p align="justify">2: 斩波模式off, 高边持续导通</p>
<p align="justify">3: 斩波模式off, 自由运行</p>
<p align="justify">4: 斩波模式off, 自由运行</p>
<p align="justify">5: 低边斩波,高边关闭</p>
<p align="justify">6: 高边斩波,低边关闭</p>
<p align="justify">7: FOC中心对称PWM模式</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">PWM_SV</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">Bit(8)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>SVPWM功能配置</b></p>
<p align="justify">0: SVPWM失能</p>
<p align="justify">1: SVPWM使能</p>
</td>
</tr>
</tbody>
</table>
<p align="center">表1 Wizard Pool-->Settings项</p>
<p align="justify"><b>0x1B的电机类型:</b></p>
<p align="justify"> TMC4671支持直流电机、步进电机、无刷电机、永磁同步电机。</p>
<p align="justify"><b>0x18的输出频率:</b></p>
<p align="justify"> 输出频率范围25k~100kHz 可配置的PWM发生器作为FOC控制器。</p>
<p align="justify"><b>0x1A的SVPWM功能配置</b>:</p>
<p align="justify"> PWM中心对称模式可以很好的利用中心点去触发ADC采样,在这种模式下,PWM信号的高电平和低电平持续时间相等,并且中间有一个等时的低电平间隔,实现了输出与反馈的同步。</p>
<p align="justify"> 且在SVPWM调制下,中心点刚好在电流最稳定的阶段,有利于远离开关的耦合噪声。在电机控制中,将PWM配置为中心对齐模式的主要原因是为了:</p>
<ol>
<li align="justify"><b>提高电机的控制精度:</b></li>
</ol>
<p align="justify"> 由于中心对齐模式提供了等时的低电平间隔,因此可以更准确地控制电机的转速和位置。</p>
<ol start="2">
<li align="justify"><b>降低电机振动和噪音:</b></li>
</ol>
<p align="justify"> 中心对齐模式可以在每个PWM周期的中间产生一个低电平间隔,这样在每次切换电机相位时,都会有一个平滑的过渡。这减少了电机瞬态过渡期间的振动和噪音,使电机运行更加平稳。</p>
<ol start="3">
<li align="justify"><b>减少电流尖峰:</b></li>
</ol>
<p align="justify"> 在一些应用中,如驱动大功率电机,PWM控制可能会导致电流尖峰。中心对齐模式可以减少这些电流尖峰,从而降低对电机和电源的负荷。</p>
<p align="justify"> </p>
<p align="justify"> </p>
<table style="border-collapse:collapse; border:none;Times New Roman"">
<tbody>
<tr>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>寄存器</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>绑定功能</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>位</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>描述</b></p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x52</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">PHI_E_SELECTION</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify"><b>电角度来源</b></p>
<p align="justify">0:(保留)</p>
<p align="justify">1: 外部给定电角度</p>
<p align="justify">2: 开环电角度</p>
<p align="justify">3: 外部ABN提供电角度</p>
<p align="justify">4:(保留)</p>
<p align="justify">5: 外部霍尔提供电角度</p>
<p align="justify">6: 模拟编码器提供电角度</p>
<p align="justify">7: 模拟编码器补偿后提供电角度</p>
</td>
</tr>
<tr>
<td rowspan="3" style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x63</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">MODE_MOTION</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>运动模式设置</b></p>
<p align="justify">0: 停止模式</p>
<p align="justify">1: 力矩模式</p>
<p align="justify">2: 电压模式</p>
<p align="justify">3: 位置模式</p>
<p align="justify">4: PRBS值作目标磁通的标志值</p>
<p align="justify">5: PRBS值作目标力矩的标志值</p>
<p align="justify">6: PRBS值作目标电压的标志值</p>
<p align="justify">7: PRBS值作目标位置的标志值</p>
<p align="justify">8: 外部给定uq、ud模式</p>
<p align="justify">9: (保留)</p>
<p align="justify">10: A组单端模拟输入作力矩模式</p>
<p align="justify">11: A组单端模拟输入作速度模式</p>
<p align="justify">12: A组单端模拟输入作位置模式</p>
<p align="justify">13: PWM输入作力矩模式 </p>
<p align="justify">14: PWM输入作速度模式</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">MODE_PID_SMPL</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">PID采样因子</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">MODE_PID_TYPE</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">Bit(31)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>PID迭代模式</b></p>
<p align="justify">0: 并行/经典PI</p>
<p align="justify">1: 顺序/高阶PI</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x24</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">UD_EXT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">外部给定开环电压控制模式的Ud</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">UQ_EXT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(31:16)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">外部给定开环电压控制模式的Uq</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x1F</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">OPENLOOP_PHI_DIRECTION</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">Bit(12)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>开环模式运行方向</b></p>
<p align="justify">0:取正</p>
<p align="justify">1:取反</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x20</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">OPENLOOP_ACCELERATION</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u32(31:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">开环模式下的加速度</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x21</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">OPENLOOP_VELOCITY_TARGET</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s32(31:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">开环模式下的目标速度</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x1B</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">N_POLE_PAIRS</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">电机极对数</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">MOTOR_TYPE</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(23:16)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>电机类型</b></p>
<p align="justify">0: (空)</p>
<p align="justify">1: 单相直流电机</p>
<p align="justify">2: 两项步进电机</p>
<p align="justify">3: 三相BLDC/PMSM</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">0x1C</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">PHI_E_EXT</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">由外部给定电角度</p>
</td>
</tr>
</tbody>
</table>
<p align="center">表2 Wizard Pool-->Open loop项</p>
<p align="justify"><b>0x63的</b><b>PID采样因子:</b></p>
<p align="justify"> PID采样因子决定着反馈采样频率</p>
<p align="justify" style="text-align: center;"> </p>
<p align="justify"> </p>
<table style="border-collapse:collapse; border:none;Times New Roman"">
<tbody>
<tr>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>寄存器</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>绑定功能</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>位</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>描述</b></p>
</td>
</tr>
<tr>
<td rowspan="5" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x0A</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I0_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify"><b>电流检测通道0数据源</b></p>
<p align="justify">0: ΔΣADC通道0输入</p>
<p align="justify">1: ΔΣADC通道1输入</p>
<p align="justify">2: 外部通道0寄存器输入</p>
<p align="justify">3: 外部通道1寄存器输入</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I1_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(15:8)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>电流检测通道0数据源</b></p>
<p align="justify">0: ΔΣADC通道0输入</p>
<p align="justify">1: ΔΣADC通道1输入</p>
<p align="justify">2: 外部通道0寄存器输入</p>
<p align="justify">3: 外部通道1寄存器输入</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I_UX_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(25:24)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>U相电流监测输入源</b></p>
<p align="justify">0: UX = ADC_I0 (default)</p>
<p align="justify">1: UX = ADC_I1</p>
<p align="justify">2: UX = ADC_I2</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I_V_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(27:26)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>V相电流监测输入源</b></p>
<p align="justify">0: UX = ADC_I0</p>
<p align="justify">1: UX = ADC_I1(default)</p>
<p align="justify">2: UX = ADC_I2</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I_WY_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(29:28)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>W相电流监测输入源</b></p>
<p align="justify">0: UX = ADC_I0</p>
<p align="justify">1: UX = ADC_I1</p>
<p align="justify">2: UX = ADC_I2(default)</p>
</td>
</tr>
<tr>
<td rowspan="10" style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x04</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">cfg_dsmodulator_a</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(1:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>A组</b><b>ΔΣADC调制器配置</b></p>
<p align="justify">0:关闭</p>
<p align="justify">1:开启</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">mclk_polarity_a</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">bit(2)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>A组ΔΣADC调制器采样时钟极性</b></p>
<p align="justify">0:取正</p>
<p align="justify">1:取反</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">mdat_polarity_a</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">bit(3)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>A组ΔΣADC调制器数据流极性</b></p>
<p align="justify">0:取正</p>
<p align="justify">1:取反</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">sel_nclk_mclk_i_a</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">bit(4)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"> </p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">blanking_a</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"> </p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">(弃用)</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">cfg_dsmodulator_b</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(17:16)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>B组ΔΣADC调制器配置</b></p>
<p align="justify">0:关闭</p>
<p align="justify">1:开启</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">mclk_polarity_b</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">bit(18)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>B组ΔΣADC调制器采样时钟极性</b></p>
<p align="justify">0:取正</p>
<p align="justify">1:取反</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">mdat_polarity_b</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">bit(19)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify"><b>B组ΔΣADC调制器数据流极性</b></p>
<p align="justify">0:取正</p>
<p align="justify">1:取反</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">sel_nclk_mclk_i_b</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">bit(20)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify"> </p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">blanking_b</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"> </p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">(弃用)</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x05</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">dsADC_MCLK_A</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u32(31:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">A组ΔΣADC调制器采样时钟</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x06</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">dsADC_MCLK_B</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u32(31:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">B组ΔΣADC调制器采样时钟</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x07</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">dsADC_MDEC_A</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">A组ΔΣADC调制器采样滤波</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">dsADC_MDEC_B</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(31:16)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">B组ΔΣADC调制器采样滤波</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: center;">表3 Wizard Pool-->ADC Registers项</p>
<p align="justify"><b>0x0A,blanking_a、blanking_b:</b></p>
<p align="justify"> blanking在2022年6月26日V2.08版更新后移除。</p>
<p align="justify"><b>0x05、0x06、0x07共同决定着SINC3滤波器的解调率:</b></p>
<p align="justify" style="text-align: center;"> </p>
<p align="justify"> </p>
<p align="justify" style="text-align: center;"> </p>
<p align="justify"> </p>
<p align="justify"> </p>
<table style="border-collapse:collapse; border:none;Times New Roman"">
<tbody>
<tr>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>寄存器</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>绑定功能</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center"><b>位</b></p>
</td>
<td style="border-bottom:2px solid black; background-color:#bdd6ee; border-top:2px solid black; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>描述</b></p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x09</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I0_OFFSET</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">设置电流检测ADC通道0的偏移量</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I0_SCALE</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(31:16)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">设置电流检测ADC通道0的缩放因子</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x08</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I1_OFFSET</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">设置电流检测ADC通道1的偏移量</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I1_SCALE</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(31:16)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">设置电流检测ADC通道1的缩放因子</p>
</td>
</tr>
<tr>
<td rowspan="6" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x0A</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I0_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify"><b>电流检测通道0数据源</b></p>
<p align="justify">0: ΔΣADC通道0输入</p>
<p align="justify">1: ΔΣADC通道1输入</p>
<p align="justify">2: 外部通道0寄存器输入</p>
<p align="justify">3: 外部通道1寄存器输入</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I1_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(15:8)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>电流检测通道0数据源</b></p>
<p align="justify">0: ΔΣADC通道0输入</p>
<p align="justify">1: ΔΣADC通道1输入</p>
<p align="justify">2: 外部通道0寄存器输入</p>
<p align="justify">3: 外部通道1寄存器输入</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I_UX_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(25:24)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>U相电流监测输入源</b></p>
<p align="justify">0: UX = ADC_I0 (default)</p>
<p align="justify">1: UX = ADC_I1</p>
<p align="justify">2: UX = ADC_I2</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I_V_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(27:26)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>V相电流监测输入源</b></p>
<p align="justify">0: UX = ADC_I0</p>
<p align="justify">1: UX = ADC_I1(default)</p>
<p align="justify">2: UX = ADC_I2</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I_WY_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u2(29:28)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify"><b>W相电流监测输入源</b></p>
<p align="justify">0: UX = ADC_I0</p>
<p align="justify">1: UX = ADC_I1</p>
<p align="justify">2: UX = ADC_I2(default)</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">ADC_I0_SELECT</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u8(7:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify"><b>电流检测通道0数据源</b></p>
<p align="justify">0: ΔΣADC通道0输入</p>
<p align="justify">1: ΔΣADC通道1输入</p>
<p align="justify">2: 外部通道0寄存器输入</p>
<p align="justify">3: 外部通道1寄存器输入</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x24</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">UD_EXT</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">开环电压控制模式下外部给定Ud</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">UQ_EXT</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">s16(31:16)</p>
</td>
<td style="border-bottom:2px solid black; background-color:#e2efda; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="justify">开环电压控制模式下外部给定Uq</p>
</td>
</tr>
<tr>
<td rowspan="2" style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">0x07</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">dsADC_MDEC_A</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(15:0)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">A组ΔΣADC调制器采样滤波</p>
</td>
</tr>
<tr>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="center">dsADC_MDEC_B</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="center">
<p align="center">u16(31:16)</p>
</td>
<td style="border-bottom:2px solid black; border-top:none; border-right:2px solid black; border-left:2px solid black" valign="top">
<p align="justify">B组ΔΣADC调制器采样滤波</p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: center;">表4 Wizard Pool-->ADC scale & offset项</p>
<p align="justify"> 经过16bit的ΔΣADC,拟合成出电流波形,可以通过双电阻采样Ia+Ib+Ic=0的方式计算出第三相的电流。</p>
<p align="justify"><b>0x08、0x09的偏移量和缩放因子:</b></p>
<p align="justify"> ADC_Ix_OFFSET是中点电位校正偏移(ADC校正偏移),由于ADC采集回来的数据均是正压,Set一下中点偏移量,即可获得正负数据的相对显示。</p>
<p align="justify"> ADC_Ix_SCALE是电流比例缩放因子,通过合理的配置,将驱动电流与标定尺达成一定比例关系,可以方便计算填入或更改时相关寄存器所对应的数值。</p>
<p align="justify"> </p>
<p align="center"> </p>
<p><b>0x08、0x09的偏移量和缩放因子感觉好难</b></p>
Jacktang 发表于 2024-4-2 07:25
0x08、0x09的偏移量和缩放因子感觉好难
<p>需要外部工具辅助,需要实时测定电机电流,才能确定需要的缩放比例,偏移量是4671自行计算了上下极值的中位点,缩放因子需要根据实际电流自行计算缩放比例</p>
页:
[1]