Visualize implicit symbolic equation expressions using Mathematica!

Table of contents 

1 The difference between Mathematica and MATLAB

1 Mathematica download and installation

1.1 Reference blog:

1.2 Notes on activation!

2 Background on solving implicit symbolic equations

        References: (Chinese Journal of Electrical Engineering, 2020): 16_A delay compensation method to improve the current control performance of LCL grid-connected inverter. This document mentions a way to introduce a lead link in the control loop, so as to simultaneously Reduce the control delay of active damping and the control delay of the main loop.

3 Mathematica implicit equation system display

3.1 Display

 3.1 FullSimplify extreme simplification

 4 Summary


0 Preface

        Welcome to communicate and reprint strictly! ! !

1 The difference between Mathematica and MATLAB

        Mathematica is more professional and its mathematical operational amplifier function is more powerful!

        MATLAB is more engineering-friendly, and its mathematical operation function is just one of its many functions!

1 Mathematica download and installation

1.1 Reference blog:

(55 messages) Mathematica [Mathematica (installation, getting started, basic calculations, basic graphics, creating interactive models, using data, slide presentations, complete examples)]_upward337's blog-CSDN bloghttps://blog.csdn.net/weixin_44949135/article/details/107434646?spm=1001.2014.3001.5506

1.2 Notes on activation!

        

Figure 1.1 Key points for activation code registration

         Fill in the ID as shown in Figure 1.1, and fill in the "Activation Code" that conforms to the specification, the motor Generate, and it will Generates a "password". Attention! The activation code filled in here is the activation code when registering the software, and the password generated here is the password that needs to be filled in when registering the software! ! !

2 Background on solving implicit symbolic equations

        References: (Transactions of the Chinese Society of Electrical Engineering, 2020): 16_A method to improve the current control performance of LCL grid-connected inverters Time compensation method, this document mentions a method of introducing a lead link into the control loop to simultaneously reduce the control delay of the active damping and the control delay of the main loop.

        In order to analyze the frequency characteristics of the resistance and reactance values ​​of the capacitive equivalent parallel impedance after introducing the lead link, the author regards the equivalent parallel impedance (Equation 8) as the parallel connection of resistance (Equation 9) and reactance (Equation 10). Doubts arise here, how to simplify it?

        Analysis and simplification steps:

        1. The expression of resistance and reactance in parallel;

        2. The expression in (8) introduces Euler’s formula;

        3. The real and imaginary parts of expressions 1 and 2 are equal.

        Now the question comes, the final one is two implicit expressions containing symbolic variables, how to make it explicit? First tried to use MATLAB to implement it, to no avail! Finally I found this Mathematica software and successfully implemented it.

Figure 2.1 Impedance Z expression and displayed R and X expressions

Put here, the simplified diagram 2.2 after introducing Euler’s formula

Figure 2.3 Introducing Euler’s formula to simplify the Z expression

3 Mathematica implicit equation system display

3.1 Display

        The solution procedure using Mathematica is as follows:

        Things to note when solving the problem:

        ​ ​ 1. Solve[] The first letter of the function here needs to be capitalized;

        2. []                                                                                                                                                                                               to be calculated within the square brackets;

        3. Multiplication does not require spaces between symbols;

        ​ ​ 4. The first letter of the function in the equation system also needs to be capitalized, such as: Cos, and the content in Cos[] needs to use [], otherwise calculation errors will occur! !​ 

        5. For specific instructions on how to use the Solve function, just click the help in the software. This is the Chinese version of the instructions! ! !

Solve[R X^2/(R^2 + X^2) == 
   Z/(1 + m^2) ((m^2 + 2 m) Cos[0.5 w T]) + Cos[1.5 w T] && 
  R^2 X/(R^2 + X^2) == 
   Z/(1 + m^2) ((2 m - m^2) Sin[0.5 w T]) + Sin[1.5 w T], {R, X}]

        Attached here are pictures of the solution results.

Figure 3.1 Solution results

 3.1 FullSimplify extreme simplification

        It can be seen that the solution result is very complex, and the FullSimplify function can be used to simplify it.

FullSimplify[
 R -> (4.` m^2 Z^2 Cos[0.5` T w]^2 + 4.` m^3 Z^2 Cos[0.5` T w]^2 + 
     m^4 Z^2 Cos[0.5` T w]^2 + 4.` m Z Cos[0.5` T w] Cos[1.5` T w] + 
     2.` m^2 Z Cos[0.5` T w] Cos[1.5` T w] + 
     4.` m^3 Z Cos[0.5` T w] Cos[1.5` T w] + 
     2.` m^4 Z Cos[0.5` T w] Cos[1.5` T w] + Cos[1.5` T w]^2 + 
     2.` m^2 Cos[1.5` T w]^2 + m^4 Cos[1.5` T w]^2 + 
     4.` m^2 Z^2 Sin[0.5` T w]^2 - 4.` m^3 Z^2 Sin[0.5` T w]^2 + 
     m^4 Z^2 Sin[0.5` T w]^2 + 4.` m Z Sin[0.5` T w] Sin[1.5` T w] - 
     2.` m^2 Z Sin[0.5` T w] Sin[1.5` T w] + 
     4.` m^3 Z Sin[0.5` T w] Sin[1.5` T w] - 
     2.` m^4 Z Sin[0.5` T w] Sin[1.5` T w] + Sin[1.5` T w]^2 + 
     2.` m^2 Sin[1.5` T w]^2 + 
     m^4 Sin[1.5` T w]^2)/((1.` + m^2) (2.` m Z Cos[0.5` T w] + 
       m^2 Z Cos[0.5` T w] + Cos[1.5` T w] + m^2 Cos[1.5` T w])) ]

        After simplification and brief processing, it can be found that it is consistent with the displayed results in the paper. Subsequently, the frequency domain bode diagram of R can be drawn to analyze its properties (positive resistance characteristics/negative resistance characteristics).

        Attached here is a picture of the simplified calculation.
 

Figure 3.2 Simplified results

 4 Summary

        ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ out out of curiosity about this software when I was taking a high-voltage course in my junior year. I was very curious about this software at the time. This software is really powerful, it can calculate directly. I came into contact with it for the first time today, and I had a good experience! ! ! Highly recommended, I hope every engineering student will no longer worry about complicated mathematical derivation and use mathematical tools appropriately! ! ! !

          get off work! ! !

Guess you like

Origin blog.csdn.net/weixin_44607175/article/details/131544692