Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 29, 2024
1 parent 97c5919 commit d9c578d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h1>Source code for gym_electric_motor.physical_system_wrappers.cos_sin_processo
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span>
<span class="p">(</span>
<span class="n">state</span><span class="p">,</span>
<span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">state</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_angle_index</span><span class="p">]</span><span class="o">*</span><span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">),</span> <span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">state</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_angle_index</span><span class="p">])</span><span class="o">*</span><span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">],</span>
<span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">cos</span><span class="p">(</span><span class="n">state</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_angle_index</span><span class="p">]</span><span class="o">*</span><span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">),</span> <span class="n">np</span><span class="o">.</span><span class="n">sin</span><span class="p">(</span><span class="n">state</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_angle_index</span><span class="p">]</span><span class="o">*</span><span class="n">np</span><span class="o">.</span><span class="n">pi</span><span class="p">)],</span>
<span class="p">)</span>
<span class="p">)</span></div>
</pre></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h1>Source code for gym_electric_motor.physical_system_wrappers.dq_to_abc_action
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">set_physical_system</span><span class="p">(</span><span class="n">physical_system</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_omega_index</span> <span class="o">=</span> <span class="n">physical_system</span><span class="o">.</span><span class="n">state_names</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="s1">&#39;omega&#39;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_angle_index</span> <span class="o">=</span> <span class="n">physical_system</span><span class="o">.</span><span class="n">state_names</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_angle_name</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_pole_pair_number</span> <span class="o">=</span> <span class="n">physical_system</span><span class="o">.</span><span class="n">_electrical_motor</span><span class="o">.</span><span class="n">motor_parameter</span><span class="p">[</span><span class="s1">&#39;p&#39;</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_pole_pair_number</span> <span class="o">=</span> <span class="n">physical_system</span><span class="o">.</span><span class="n">electrical_motor</span><span class="o">.</span><span class="n">motor_parameter</span><span class="p">[</span><span class="s1">&#39;p&#39;</span><span class="p">]</span>
<span class="k">assert</span> <span class="bp">self</span><span class="o">.</span><span class="n">_angle_name</span> <span class="ow">in</span> <span class="n">physical_system</span><span class="o">.</span><span class="n">state_names</span><span class="p">,</span> \
<span class="sa">f</span><span class="s1">&#39;Angle </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_angle_name</span><span class="si">}</span><span class="s1"> not in the states of the physical system. &#39;</span> \
<span class="sa">f</span><span class="s1">&#39;Probably a flux observer is required.&#39;</span>
Expand Down

0 comments on commit d9c578d

Please sign in to comment.