python英文汇总simulating-nonlinear-circuits-with-python-power-electronics_W_第1页
python英文汇总simulating-nonlinear-circuits-with-python-power-electronics_W_第2页
python英文汇总simulating-nonlinear-circuits-with-python-power-electronics_W_第3页
python英文汇总simulating-nonlinear-circuits-with-python-power-electronics_W_第4页
python英文汇总simulating-nonlinear-circuits-with-python-power-electronics_W_第5页
已阅读5页,还剩210页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Shivkumar V. IyerSimulating Nonlinear Circuits with Python Power ElectronicsAn Open-Source Simulator, based on Python1 3Shivkumar V. Iyer OntarioCanadaThis book is based on the free and open source software Python Power Electronics hosted at the website ISBN 978-3

2、-319-73983-0ISBN 978-3-319-73984-7 (eBook)/10.1007/978-3-319-73984-7Library of Congress Control Number: 2017963531 Springer International Publishing AG, part of Springer Nature 2018Contents1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3、 .11357911131314151719Concept Behind Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . .The Reason for Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . .Simulation in Power Electronics and the Challenges . . . . . . . . . .Python Power Electronics .

4、 . . . . . . . . . . . . . . . . . . . . . . . . . . . .Outline of the Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2Introduction to Python . . . . . . . . . . . . . . . . . . . . . . . . .

5、. . . . . . . . . .2.7Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Overview of Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6、. .Integers, Floats, and Strings Lists and Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examples of Python Code in the Simulato

7、rListsand Matrices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examples of Python Code in the SimulatorStrings . . . . . . . . .Examples of Python Code in the SimulatorDictionaries . . . . . .Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8、. . . . . . .232630323535363942434444403User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.4Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Circuit Representation . . . . . . . . . . . . . .

9、 . . . . . . . . . . . . . . . . . .Processing of Components . . . . . . . . . . . . . . . . . . . . . . . . . . . .Data Structures of Components . . . . . . . . . . . . . . . . . . . . . . . . ...4Resistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Induc

10、tor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VoltageSource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....103.4.11Ammeter . . . . . . . . . . . . .

11、. . . . . . . . . . . . . . . . . . . . . .Voltmeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VariableResistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VariableInductor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .ControlledVoltageSource . . .

12、. . . . . . . . . . . . . . . . . . . .Diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464748495050515252535455555657575758585959606363646974808385858689943.5Logical Flow of the Simulation

13、. . . . . . . . . . . . . . . . . . . . . . . . ...43.5.5Launch Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Simulation Parameters . . . . . . . . . . . . . . . . . . . . . . . . .Create Component Objects . . . . . . . . . . . . . . . . . . . . . .Circuit Param

14、eters File . . . . . . . . . . . . . . . . . . . . . . . . .Update Component Parameters . . . . . . . . . . . . . . . . . . .3.6Iterative Procedure During the Simulation . . . . . . . . . . . . . . . . ....63.6.7Simulation Time Instant . . . . . . . . . . . . . . . . . . .

15、. . . . .Update Branch Data . . . . . . . . . . . . . . . . . . . . . . . . . . .Generate Input Voltage . . . . . . . . . . . . . . . . . . . . . . . . .Run Control Code . . . . . . . . . . . . . . . . . . . . . . . . . . . .Perform Circuit Analysis . . . . . . . . . . . . . . . . . . . . . . .Updat

16、e Component Objects. . . . . . . . . . . . . . . . . . . . .Write Output Data . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.7Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4Interface for User Control Functions . . . . . . . . . . . . . . . . . . .

17、 . . . . .Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Inclusion of Control in the Simulator . . . . . . . . . . . . . . . . . . . . .Special Variables in Control Code . . . . . . . . . . . . . . . . . . . . . . .Time Scheduling Control

18、Code . . . . . . . . . . . . . . . . . . . . . . . . .Interfacing Control Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Case StudyShunt VAR Compensator . . . . . . . . . . . . . . . . . . . .

19、. .5.45.5Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Description of the Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Parameters of the Simulation and the Circuit . . . . . . . . . . . . . . .First Stage in Control Development

20、Grid Synchronization Second Stage in Control DevelopmentCurrent Reference Generation and Closed-Loop Current Control . . . . . . . . . . . . . . .Final Stage of Control DevelopmentThe Entire Circuitwith the VSC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Conclusions .

21、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1025.61141281311311325.76Nodes, Branches, and Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.16.2Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Jump Label

22、s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6.3Nodes and Branches1356.4Short Branches and Nodes139欢6迎.5加入C非o盈nn利ePcytitvhiotny编M程a学p习fo交r 流NQoQd群al78A34n6a2l3y4s7is,群里免费提供500+本Python书籍!141. . . . . . . . . . . . . . . . . . . .Loops . . . . . . . . . . . . . . . .

23、. . . . . . . . . . . . . . . . . . . . . . . . . . .Loop Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1441531551571571591631671701731751801821851851861901931962002

24、022042072072092122157Circuit AnalysisLoop Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . .Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Matrices for Loop Analysis . . . . . . . . . . . . . . . . . . . . . . . . . .

25、 . .Solving the Matrix Equation . . . . . . . . . . . . . . . . . . . . . . . . . . .Mapping Branch Currents and Loop Currents . . . . . . . . . . . . . . .Effects of Time Constants on Loop Analysis. . . . . . . . . . . . . . .Effect of Stiff Loops . . . . . . . . . . . . . . . . . . . . . . . . . .

26、 . . . . . . .Loop Manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Limitation of Loop Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . .Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8Circuit AnalysisNodal Analysis .

27、 . . . . . . . . . . . . . . . . . . . . . . . . . .8.78.8Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Concept of Nodal Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . .Limitation of Loop Analysis in Nonlinear Circuits. .

28、. . . . . . . . .Applying Nodal Analysis in Nonlinear Circuits. . . . . . . . . . . . .Continuing with Loop Analysis . . . . . . . . . . . . . . . . . . . . . . . . .Event-Driven Circuit Updates . . . . . . . . . . . . . . . . . . . . . . . . . .Process Flow in the Simulator . . . . . . . . . . . .

29、. . . . . . . . . . . . . .Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Advantages of the Simulator . . . . . . . . . . . . . . . . . . . . . . . .

30、 . . .Drawbacks of the Simulator and Scope for Future Work . . . . . . .Future of the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Chapter 1In欢t迎ro加d入非u盈ct利iPoytnho

31、n编程学习交流QQ群783462347,群里免费提供500+本Python书籍!Abstract This chapter introduces the concept of simulation by describing its use- fulness with a few general engineering examples. The chapter then describes the current state of the power system and the recent changes that have occurred along with the changes

32、 that are expected in the future. The chapter describes the challenge of tackling climate change with renewable energy and the recent advances in wind and solar energy. With this background, the chapter introduces Python Power Elec- tronics and describes the usefulness of a free and open-source circ

33、uit simulator and building a community of power engineers.Keywords Simulation Modern power systems Renewable energy Climate change Smart grids Power quality Open-source technology1.1Concept Behind SimulationSimulation from its basic definition is the imitation of an actual process. In modern times,

34、the software definition of simulation is also availablethe representation of the behavior or characteristics of one system through the use of another system, especially a computer program designed for the purpose. Though most engineers spend a significant amount of time simulating the systems they s

35、tudy, simulation as the above-defined concept is something almost everyone has been exposed to at some point of time. Simulation by its definition is when a real-world process is repeated. Let us look at some examples of simulation that we never stopped to think about.For most of us who were born wh

36、en computers were ubiquitous household machines, the first form of simulations is computer games. A computer game may be a car racing game, a war or fighting game, playing chess against the computer, or one of the strategy games that have become very popular recently. Almost all of these are imitati

37、ons of real-world events. Behind the fancy graphics and the celebrity status characters lies a very complex algorithm that creates the environment wheregamers find themselves constantly challenged. The environment changes to make the game tougher for the gamer in various forms - stronger enemies, to

38、ugher roadcon欢di迎tio加n入s 非to盈dr利ivPeytohnono编r 程m学or习e c交o流mQpQl群ex78c3h4e6s2s34m7,ov群es里. T免h费es提e供ar5e00e+x本amPyptlheosn书of籍h!ow acomputer program has been designed to provide an entertaining platform for a user and also the program adjusts to user inputs not only in allowing the user to navigate

39、the software but in making the platform more challenging for theuser.As the time comes for younger adults to get their driving licenses, they are quite often exposed to driving simulators. Unlike the video games, these have a more practical purpose in providing a new driver with necessary skills and

40、 also offering advice on road safety and illegal manoeuvres. Nowadays, there are some countries in the world where a driving license can be issued on passing a virtual driving test on a simulator rather than a road test. This shows how greater faith is being placed on simulators where the judgment o

41、f an experienced professional was the only one that was trusted. A more advanced form of simulator is the flight simulator made available to pilots during training. However, these are rarely accepted as the only form of training due to the critical nature of the skill to beacquired.As adults, most o

42、f us have used simulators without knowing it, for example tax planning software. Almost everyone uses it when the time comes to file our tax returns. How much would we be paying in taxes? How much would we save by investing in Plan A and how does that compare with Plan B? Which expenses are tax dedu

43、ctible? Does your place of residence bring you tax benefits? Does your nature of employment entitle you to deductible expenses? If anyone reading this book has never used a tax planning software, you probably are paying way too much in taxes. In this case again, there is a fairly complex program tha

44、t asks users for every detail that could affect their taxes and calculates the tax owed.One of the most complex forms of simulation that have not yet been fully mastered is that of weather forecasting. With the mobile phone in everyones hand, almost everyone looks at the weather forecast before step

45、ping out of the house. Weather forecast is incredibly challenging because it is very strongly dependent on location- coastal versus inland, tropical versus temperate, equator versus sub-Arctic. And weather forecast still is an incredible challenge. The most powerful form of weather prediction is the

46、 storm watch. This is where a storm is tracked from the time it builds up to the time is finally dies. The number of variables that are involved in weather forecasting is simply mind-boggling.With the above background on examples of simulators that everyone is exposed to, let us examine the speciali

47、zed simulators that this book is all about. A simulation is a powerful and convenient way to monitor and understand a physical process. Simulation involves representing the physical process in the form of mathematical equations which is called a mathematical model and solving them over time. The inp

48、uts to the mathematical model are the factors which affect the physical process, and the outputs of the mathematical model are the physical quantities that are of interest for a variety of reasonsefficiency, safety, endurance, and many others.1.2The Reason for Simulation欢迎加入非盈利Python编程学习交流QQ群7834623

49、47,群里免费提供500+本Python书籍! There a number of reasons why engineers will want to simulate the system thatthey are designing, and we shall examine them one after the other. The simplest reason for simulating a physical system is because computers powerful enough to perform simulations are now ubiquitous.

50、 Fifty years back, in order to run a computer program, an engineer would have to buy processing “time” on a mainframe. This processing time was quite expensive, and therefore physical systems were simulated when building a prototype was very expensive. Nowadays, a reasonably powerful computer can be

51、 purchased off the shelf, and engineering software can be installed on almost every machine. So the answer to the first question “Why do you want to simulate a physical system?” is “Why not?”.To describe the other advantages, let us progress gradually from simple cases to more complex cases. If an e

52、ngineer was designing a system that was fairly simple say for example a pendulum or a battery operated miniature motor, it is possible to skip the simulation step and by trial and error arrive at the final design. However, every design needs parts and supplies to be procured as well as structures fa

53、bricated. A change in the design will only result in repeated procurement of new supplies and parts and modifications to the structures or completely new structures becoming necessary. A simulation of these simple systems could significantly reduce the number of designs if not produce a working desi

54、gn at the first step. The result is lower time to finalize the design, lower cost of the project, and less waste.Now for a more complicated case, let us suppose that an engineer needs to design a power supply. This design requires a detailed understanding of the power require- ments of the intended

55、load, the topology of the power supply that will achieve such quality of power, and finally a method to control devices such that this power quality is always achieved. In such an engineering project, there are several components and variables that need to chosen appropriately and furthermore, the c

56、hoice of one affects the other. For example, a filter at the output of the power supply can be chosen such that it ensures that the power provided at the output is of a desired nature. However, this filter might make the control of the power device extremely complex or even impossible. If this engineering project were to be directly realized at the prototype stage, it would be very time-consuming, involving several changes and possibly even failures that could r

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论