A trapezoid has four sides. The bottom base is three times the length of one of the diagonal sides. The top base is seven units less than the length of one of the diagonal sides. The diagonal sides are the same length. Write and simplify an expression to represent the perimeter of the trapezoid.