In a flyback converter, we have the freedom to choose appropriate duty
cycle by adjusting the turn ratio to meet the desired output voltage.
That is half-right and half-wrong.
A flyback converter may operate wholly in continuous conduction mode (CCM) when the minimum load current is not too low. However, if the load range also covers quite light currents then, it's likely that the flyback converter will drop into discontinuous conduction mode (DCM).
- In DCM, the transformer turns ratio does not affect the choice of duty cycle.
- In CCM, the transformer turns ratio does affect the choice of duty cycle.
Consider this scenario of a 1:1 isolating transformer producing 100 volts out with a supply of 100 volts DC. It operates naturally in DCM in this first scenario: -

The duty cycle is 44.721% and, if I changed the turns ratio to 2:1 we would see this: -

Despite the turns ratio changing, the duty cycle remains at 44.721% and still in DCM.
Images from my somewhat incomplete flyback calculator page.
If I lowered the turns ratio to 0.5 the circuit would enter CCM and, at that point, duty cycle does change with the turns ratio value: -

Now it is 33.333% and if I lowered the turns ratio to 0.25 the duty cycle drops to 20% (still in CCM): -

How do we appropriately select the duty cycle in a flyback converter?
and
How do we come up with desired duty cycle? Is it based on the
datasheet graphs corresponding to highest efficiency?
Well, you have to understand the two modes of operation (DCM and CCM) and their respective voltage transfer ratio formulas: -

- In CCM, the transfer ratio is influenced by the transformer turns ratio and, because it has one-less degree of freedom compared to DCM, the output voltage is dictated by the primary and secondary currents forming a continuously changing flux in the core without it falling to zero. This makes it behave like a voltage regulator.
- In DCM, the transfer ratio isn't influenced by the transformer because the flyback circuit is behaving like a power regulator; energy is swallowed by the primary during charge and wholly given to the secondary during the transfer phase of switching.
The link says
The link in your question is also really quite bad. It states that DCM is characterized by the converter having its rectifier current decreasing to zero before the start of the next switching cycle - all flyback converters have this characteristic (DCM and CCM) so, right away, the article is off to a bad start and cannot be trusted. Ignore that article is my advice.
DCM is characterized by the converter having its rectifier current decreasing to zero before the start of the next switching cycle
- all flyback converters have this characteristic (DCM and CCM) so, right away, the article is off to a bad start and cannot be trusted. \$\endgroup\$