ac model for buck-boost converter

This lecture shows how to create ac model for buck-boost converter.

What I am confused is the equivalent circuit model for inductor loop equation
on page 38.

As you can see from the model, there are two dependent voltage source
(square boxes), $D\hat{v}_g$ and $D'v$, and one independent voltage source (circle symbol), $(V_g -V)\hat{d}$.

What is the basis to distinguish/know which one is dependent or independent source here?

For example, why is $D\hat{v}_g$ considered as dependent source? I thought it is an independent source because $\hat{v}_g$ is the input voltage and it is independent source. However, I am wrong here.

In the AC modeling of converters, what is considered is the average over one period of a certain quantity (e.g. $\langle v(t)\rangle=\frac{1}{T}\int_0^Tv(t)\mathrm{dt}$), in order to maintain the slowly varying behaviour of electric quantities, while eliminating high frequency variations and ripples.
Using this approach to model the inductor in the circuit you showed, it is $$\langle v_L(t)\rangle=d(t)\langle v_g(t)\rangle + [1-d(t)]\langle v(t)\rangle = L\frac{d}{dt}\langle i(t)\rangle$$ where $d(t)$ is the duty cycle in the period that was considered, and the other quantities are named as per the circuit you provided.
If you now consider all quantities as being a DC value + an AC small variation/perturbation (e.g. $\langle v_L(t)\rangle=V_L + \hat{v}_L(t)$), you obtain $$L\frac{d}{dt}[I_L + \hat{i}_L(t)]=[D + \hat{d}(t)][V + \hat{v}(t)] + [1-D-\hat{d}(t)][V+\hat{v}(t)].$$ If you now compute all the products and neglect all DC (e.g. $DV$) and second order terms (e.g. $\hat{d}(t)\hat{v}(t)$), you obtain the very expression shown in the picture you uploaded (where $D'=1-D$).
Now, consider which quantities are you using to control your converter: you obviously use the duty-cycle, and $\hat{d}(t)$ is the perturbation on it that causes the circuit to steer away from the precise working point you wish to have; thus $(V_g - V)\hat{d}(t)$ is your independent source, since it is due to your control circuit.