Loan amortisation can be very thorny to model. I’ll tell you how it actually works, then how its modelled, which isnt the same.
How it actually works is, the loan documentation will provide an amortisation schedule, so what amount of principal needs to be repaid at what date. That’s called the scheduled amortisation, and you could model that easily with a hardcoded table.
Where it gets tricky is, you typically have a cash sweep, meaning some % of excess cash flow at year end is applied to debt repayment. Idea is, if the project generates more cash, debtholders can de-risk faster. The snag is, this is actually documented as a prepayment against future scheduled amortisation, ie the next’s period’s scheduled amortisation is lowered. Its also typically pro rata by pari passu tranche, say if you have several currencies. So from a raw modelling standpoint, putting all of this in can get pretty tedious. Your hardcoded amortisation schedule would need to dynamic, and its a pain.
In practice, what you do is assume some amortisation schedule as % of par, then apply the cash sweep to the remaining debt balances on BS, and test each period that you dont repay more than 100% of par. This creates a very slight timing inconsistency in the model, but its a really irrelevant error compared to the margin of error of the rest of the model.
Of course the cash sweep only applies if DSCR is north of 1.0x say (in practice there is typically a minimum sweep amount to avoid the hassle and cost of doing all the admin if the excess cash is too low, so maybe DSCR of 1.1x or 1.2x, but for modelling purposes that’s not really a concern).
Now you need to be careful on the cost of debt. There is often a margin ratchet, say based on leverage, with a grid. The lower the leverage, the lower the spread on the loan, so you’d need to factor that in for a robust model. Though in practice that’s typically ignored in models, because the lower margin means less credit risk, so not worth the hassle, unless you need to be ultra precise for covenants and taxes.
Caveat: all the above applies to highly leveraged corporate deals, solar infra might be a bit different, but should be broadly comparable.