Différences
Ci-dessous, les différences entre deux révisions de la page.
en:cs:modelling_multi-phased_electrical_system_interconnexion [2020/10/28 21:27] – [Typescript code sketches] fraggle | en:cs:modelling_multi-phased_electrical_system_interconnexion [2021/12/27 18:25] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 66: | Ligne 66: | ||
<code javascript> | <code javascript> | ||
- | export class ElectricUtils | + | /** |
- | | + | * Targeted to AC related values calculation. |
+ | */ | ||
+ | export class ACElectricUtils | ||
+ | static | ||
return nbOfPhases * Iph; | return nbOfPhases * Iph; | ||
} | } | ||
- | | + | static |
const powerPerPhase = V * Iph * cosPhi; | const powerPerPhase = V * Iph * cosPhi; | ||
if (cosPhi === 1) { | if (cosPhi === 1) { | ||
Ligne 79: | Ligne 82: | ||
} | } | ||
- | | + | static |
- | return nbOfPhases * ElectricalUtils.calculatePowerPerPhase(V, Iph, cosPhi); | + | return nbOfPhases * ACElectricUtils.powerPerPhase(V, Iph, cosPhi); |
} | } | ||
- | | + | static |
- | const power = ElectricalUtils.calculateAmpTotalFromPower(P, V, cosPhi); | + | const amperage |
- | const powerPerPhase = power / nbOfPhases; | + | if (cosPhi === 1 && P % V === 0) { |
- | if (power % nbOfPhases | + | return |
- | return | + | |
} | } | ||
- | return Math.round(powerPerPhase); | + | return Math.round(amperage); |
} | } | ||
- | | + | static |
- | const power = P / (V * cosPhi); | + | const amperage |
- | if (cosPhi === 1 && P % V === 0) { | + | const amperagePerPhase = amperage / nbOfPhases; |
- | return | + | if (amperage |
+ | return | ||
} | } | ||
- | return Math.round(power); | + | return Math.round(amperagePerPhase); |
+ | } | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Targeted to DC related values calculation. | ||
+ | */ | ||
+ | export class DCElectricUtils { | ||
+ | static | ||
+ | return V * I; | ||
+ | } | ||
+ | |||
+ | static amperage(P: number, V: number): number { | ||
+ | const amperage = P / V; | ||
+ | if (P % V === 0) { | ||
+ | return amperage; | ||
+ | } | ||
+ | return Math.round(amperage); | ||
} | } | ||
} | } | ||
Ligne 135: | Ligne 155: | ||
Iph: Math.min(Car.Iph, | Iph: Math.min(Car.Iph, | ||
V: Math.min(Car.V, | V: Math.min(Car.V, | ||
- | I: ElectricityUtils.calculateAmpTotal(this.nPhases, | + | I: ACElectricUtils.amperageTotal(this.nPhases, |
- | P: ElectricityUtils.calculatePowerTotal(this.nPhases, | + | P: ACElectricUtils.powerTotal(this.nPhases, |
}; | }; | ||
} | } | ||
Ligne 148: | Ligne 168: | ||
const ChargingSchedulePeriod = { | const ChargingSchedulePeriod = { | ||
startPeriod: | startPeriod: | ||
- | limit: 15, // Sanity check: ensure the limit is below getCombinedElectricalObject(Car, ChargingStation).Iph | + | limit: 15, // Sanity check: ensure the limit is below getCombinedElectricObject(Car, ChargingStation).Iph |
- | numberPhases: | + | numberPhases: |
}; | }; | ||
Ligne 155: | Ligne 175: | ||
====== Modelling multi-phased AC/DC electrical system ====== | ====== Modelling multi-phased AC/DC electrical system ====== | ||
+ | ===== AC modelling ===== | ||
+ | See first section. | ||
===== Rectifier modelling ===== | ===== Rectifier modelling ===== | ||
- | |||
FIXME | FIXME | ||
+ | ===== DC modelling ===== | ||
+ | FIXME | ||
====== Modelling multi-phased DC/AC electrical system ====== | ====== Modelling multi-phased DC/AC electrical system ====== | ||
+ | ===== DC modelling ===== | ||
+ | FIXME | ||
===== Inverter modelling ===== | ===== Inverter modelling ===== | ||
- | |||
FIXME | FIXME | ||
+ | ===== AC modelling ===== | ||
+ | See first section. | ||
====== References ====== | ====== References ====== | ||
Composants symétriques : https:// | Composants symétriques : https:// |