Creazione di componenti e librerie personalizzate
Scoprire gli esempi che illustrano la creazione di componenti e librerie personalizzate.
Informazioni complementari
Esempi in primo piano
Sistema HVAC del veicolo
Questo esempio modella il flusso di aria umida in un sistema di riscaldamento, ventilazione e condizionamento (HVAC) di un veicolo. L’abitacolo del veicolo è rappresentato come un volume di aria umida che scambia calore con l'ambiente esterno. Prima di rientrare nell’abitacolo, l'aria umida passa attraverso una bocchetta di ricircolo, una ventola, un evaporatore, uno sportello di miscelazione e un riscaldatore. La bocchetta di ricircolo seleziona l'ingresso del flusso dall’abitacolo o dall'ambiente esterno. Lo sportello di miscelazione devia il flusso intorno al riscaldatore per controllare la temperatura.
Aircraft Environmental Control System
Models an aircraft environmental control system (ECS) that regulates pressure, temperature, humidity, and ozone (O3) to maintain a comfortable and safe cabin environment. Cooling and dehumidification are provided by the air cycle machine (ACM), which operates as an inverse Brayton cycle to remove heat from pressurized hot engine bleed air. Some hot bleed air is mixed directly with the output of the ACM to adjust the temperature. Pressurization is maintained by the outflow valve in the cabin. This model simulates the ECS operating from a hot ground condition to a cold cruise condition and back to a cold ground condition.
Sistema di celle a combustibile PEM
Questo esempio mostra come modellare uno stack di celle a combustibile a membrana a scambio protonico (PEM) con un blocco Simscape™ personalizzato. La cella a combustibile PEM genera energia elettrica consumando idrogeno e ossigeno e producendo vapore acqueo. Il blocco personalizzato rappresenta l'assieme membrana-elettrodo (MEA) ed è collegato a due reti di aria umida separate: una per il flusso di gas dell'anodo e una per il flusso di gas del catodo.
Sistema di elettrolisi PEM
Questo esempio mostra come modellare un elettrolizzatore dell'acqua a membrana a scambio protonico (PEM) con un blocco Simscape™ personalizzato. L'elettrolizzatore PEM consuma energia elettrica per dividere l'acqua in idrogeno e ossigeno. Il blocco personalizzato rappresenta l'assieme membrana-elettrodo (MEA) ed è collegato a una rete di liquido termico e a due reti di aria umida separate: la rete di liquido termico modella l'alimentazione idrica, la rete di aria umida dell'anodo modella il flusso di ossigeno e la rete di aria umida del catodo modella il flusso di idrogeno.
Ultracapacitor Energy Storage with Custom Component
Use the Simscape™ example library Capacitors_lib. The model is constructed using components from the example library. The circuit charges an ultracapacitor from a constant 0.05 amp current source, and then delivers a pulse of current to a load. The ultracapacitor enables a much higher current to be delivered than is possible directly from the current source. The library contains capacitor models with different levels of fidelity to allow exploration of the effect of losses and nonlinearity.
Transmission Line
A lumped parameter transmission line model. It is built from a custom Simscape™ component that defines a single T-section segment. The model concatenates 50 segments, each of length 0.1m, thereby modeling a 5m length of coaxial cable. The transmission delay can be observed from the simulation results.
Engine Cooling System
Model a basic engine cooling system using custom thermal liquid blocks. A fixed-displacement pump drives water through the cooling circuit. Heat from the engine is absorbed by the water coolant and dissipated through the radiator. The system temperature is regulated by the thermostat, which diverts flow to the radiator only when the temperature is above a threshold.
Ciclo Brayton (turbina a gas) con componenti personalizzati
Questo esempio modella un'unità di potenza ausiliaria (APU) a turbina a gas basata sul ciclo Brayton. I blocchi Compressor e Turbine sono componenti personalizzati basati sulla Libreria di base Simscape™ Gas. La potenza immessa nel sistema è rappresentata dall'iniezione di calore nel combustore; l'effettiva chimica della combustione non viene modellata. Un singolo albero collega il compressore e la turbina, in modo che la potenza generata dalla turbina azioni il compressore. L'unità di potenza ausiliaria (APU) che espande ulteriormente il flusso di scarico per generare potenza in uscita.
Rankine Cycle (Steam Turbine)
Models a steam turbine system based on the Rankine Cycle. The cycle includes superheating and reheating to prevent condensation at the high-pressure turbine and the low-pressure turbine, respectively. The cycle also has regeneration by passing extracted steam through closed feedwater heaters to warm up the water and improve cycle efficiency.
Battery Cell with Custom Electrochemical Domain
Use the Simscape™ example library ElectroChem_lib. In the model Fe3+ ions are reduced to Fe2+, and Pb is oxidized to Pb2+, thereby releasing chemical energy. The molar flow rate of lead ions is half that of the iron ions as two electrons are exchanged when Pb is oxidized to Pb2+. The chemical potential of the Pb source is by convention zero as it is a solid.
Lead-Acid Battery
Model a lead-acid battery cell using the Simscape™ language to implement the nonlinear equations of the equivalent circuit components. In this way, as opposed to modeling entirely in Simulink®, the connection between model components and the defining physical equations is more easily understood. For the defining equations and their validation, see Jackey, R. "A Simple, Effective Lead-Acid Battery Modeling Process for Electrical System Component Selection", SAE World Congress & Exhibition, April 2007, ref. 2007-01-0778.
Cella della batteria al litio - Circuito equivalente a un ramo RC
Questo esempio mostra come modellare una cella al litio utilizzando il linguaggio Simscape™ per implementare gli elementi di un modello di circuito equivalente con un ramo RC. Per le equazioni di definizione e la loro validazione, vedere T. Huria, M. Ceraolo, J. Gazzarri, R. Jackey. “Modello elettrico ad alta fedeltà con dipendenza termica per la caratterizzazione e la simulazione di celle di batterie al litio ad alta potenza”, Conferenza Internazionale IEEE sui Vecoli Elettrici, marzo 2012.
Cella della batteria al litio - Circuito equivalente a due rami RC
Questo esempio mostra come modellare una cella al litio utilizzando il linguaggio Simscape™ per implementare gli elementi di un modello di circuito equivalente con due rami RC. Per le equazioni di definizione e la loro validazione, vedere T. Huria, M. Ceraolo, J. Gazzarri, R. Jackey. “Modello elettrico ad alta fedeltà con dipendenza termica per la caratterizzazione e la simulazione di celle di batterie al litio ad alta potenza”, Conferenza Internazionale IEEE sui Vecoli Elettrici, marzo 2012.
Lithium-Ion Battery Pack with Fault Using Arrays
Simulate a battery pack that consists of multiple series-connected cells. It also shows how you can introduce a fault into one of the cells to see the impact on battery performance and cell temperatures. The battery pack is modeled in Simscape™ language by connecting cell models in series using arrays. You can represent the fault by defining different parameters for the faulty cell.
Variable Transport Delay
Use Simscape™ to model a variable transport delay. The Transport Delay block models signal propagation through media moving between the Input and the Output terminals. The media velocity may vary, thus it is specified through the block port. The distance between the terminals as well as the initial output are constant and they are specified as block parameters.
Asynchronous PWM Voltage Source
How the Simscape™ Foundation Library PS Asynchronous Sample & Hold block can be used to build components with more complex behaviors. The model implements a controllable PWM voltage source where the PWM on-time (the duty cycle) is proportional to the physical signal input u.
Discrete-Time PWM Voltage Source
How the discrete-time Simscape™ Foundation Library PS Counter block can be used to build components with more complex behaviors. The model implements a controllable PWM voltage source where the PWM on-time (the duty cycle) is proportional to the physical signal input u.
Actuation Circuit with Custom Pneumatic Components
Model a controlled actuator using simplified custom pneumatic components. There are two across variables, defined as pressure and temperature, and two through variables, defined as mass flow rate and heat flow rate. The simplified approach means that every node in the circuit must have a volume of gas associated with it. This physical volume of gas in the circuit is represented by the Constant Volume Pneumatic Chamber blocks, the Pneumatic Piston Chamber blocks, and the Pneumatic Atmospheric Reference block. Conversely, the Foundation Library gas components require no such connection rules at every node. See the Pneumatic Actuation Circuit example for a more capable way of modeling pneumatic systems using Foundation Library gas components.
Simscape Functions
Write Simscape™ functions to compute numerical values with Simscape expressions and how to use Simscape functions to improve code reuse across components. The top two Simscape component blocks ( inside the "Use no Simscape functions" box ) are respectively created using two Simscape component files. Comparing these two component files, similar Simscape expressions can be observed on the right hand side of the equation to compute numerical values, which is essentially a modification of exp(i) to provide protection for large magnitude of i. Such expressions are common in standard diode modeling. Using Simscape functions, such expressions are abstracted out into a Simscape function file, and their usages inside the component files are replaced by calls to such Simscape functions. The bottom two Simscape component blocks ( inside the "Use Simscape functions" box ) are created using component files using Simscape functions.
Mass on Cart Using an Ideal Hard Stop
A cart bouncing between the two ends of an ideal hard stop, while a mass slides freely on top of it. The friction between the mass and cart is modeled using an ideal, modechart-based friction block, while the hard stop is modeled using instantaneous modes and entry actions. When the cart hits the bounds of the hard stop, the impulsive force is propagated to the mass above, causing it to be displaced as it transitions from static to dynamic friction modes.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)